Unity's Live Recompile: Is it broken?
By Mark Currie •
Unity's implementation of Live Recompile has serious issues. This feature is supposed to let you edit code without having to restart your app.
Visual Studio shows us how good this feature can be. Its Edit-and-Continue is quite impressive. I love how you can fix a bug while the app is paused and test a fix without having to restart. It works great.
With Unity, you have to think about how the system works, what fields should be serialized and label everything accordingly. It's tedious to maintain.
After speaking to my customers, what I realized is, nobody is maintaining their projects to support Live Recompile.
What typically happens is something like this. In the middle of testing, you accidentally save a file, Unity invokes Live Recompile and...FAIL! You see a bunch of strange errors in the console and have no choice but to stop your app.
I've trained myself to never press save while my app is running. That's a bad habit to learn! The feature is tedious to the point that nobody uses it, in other words it's practically useless.
The Visual Studio team talked about the difficultly implementing Edit-and-Continue. Visual C++ initially got it in 1998, but C# didn't until 2005. It's a hard problem.
Unity's new CEO John Riccitiello likes to say "Unity solves hard problems". We'll see how Unity attempts to resolve this one. If Unity cannot get it working well enough that people use it, they should just drop it. Or at the very least, allow people to turn it off in a graceful way.
In the meantime, I implemented a feature in ConsoleE that disables live recompile without annoying side effects. I put it in the free lite version, if you want to try it out. It works like this. When you save a change, Unity will wait until you press stop. Only then will it rebuild your changes. There are a couple more advanced modes, but that's the main one. Until Unity resolves this issue, it's a nice having a tool to gracefully work around it.
EDIT: Cape Guy blogged about this topic in detail. He also posted source code showing another way to avoid live recompile. It's an interesting read.
Comment or feedback?
If Unity's Live Recompile is causing you more grief than benefit, use this free tool to disable it!
http://t.co/QL4KyiiSXK
@UnityAssetStore
— buildstep - Mark (@buildstep) October 11, 2015
Posted by Unity Console on Sunday, October 11, 2015
Copyright © 2016 Buildstep.com