Auto compilation interferes with work sometimes (even often). It would be better to make options to choose: either аuto compiling or compiling by button. And a checkbox (if the second): compile when play pressed.
PS: please do not advise me to uncheck “Auto refresh” in Preferences. It won’t make work process more comfortable.
I want to turn off auto compilation (or to have possibility to do this), I don’t want to turn off auto refreshing of all assets, because auto refreshing is very useful option.
Absurdity of the situation is that Unity sometimes compiles automatically in spite of disabled auto refreshing and doesn’t refreshes automatically because of disabled auto refreshing.
So unchecked “Auto refresh” does not look like good and stable solution, but looks like a necessary evil or a freaky crutch.
In no way do I mean to invalidate your request with this response, but while you are waiting for a reply to this I figured you might be interested in a workaround. You can create and manage a C# project outside of Unity. (Keep the C# project in the Unity Project folder (above Assets folder) if you want to keep everything together). And you can configure your project to place the compiled DLL where ever you like. In your case, you can ask it to place the compiled DLL into your Assets folder. So, you get to choose when your scripts are recompiled because you’ll be compiling them manually in visual studio.
Of course, this doesn’t work if you use any external scripts/plugins that you do not control, but maybe this suggestion will tie you over until then. We have lots of external scripts and such in our project but we rarely edit them so they aren’t culprits behind the recompilations.
Well… this way is still a crutch and it has some problems (renaming of MonoBehaviour scripts, reinitialisation of custom libraries each time and so on), but thanks for participation.
Yes not a perfect solution. So regarding your feature request, what do you image the workflow would be like? Would it compiled on play? What about editor scripts? Maybe a compile button becomes visible somewhere if you enable this feature?
Of Course it should be a UI button + hotkey (or possibility to bind a key combination).
Concerning editor scripts, I don’t think they should be an exception. Editor scripts may be a target of multiple actions too. You can rename, then move to other folder, then delete something, and Unity will recompile after each of these actions and will enrage each time and make life hell.
I’m afraid I’m not really sure what you mean. If this is about compiling while the editor is in play mode, I don’t see any problem. If you don’t want to compile while playing just don’t push the compile button.
PS I don’t really care for this feature, I am just asking you lots of questions so that when and if someone from Unity stumbles upon this, they have lots of information to go off.