- Home /
Is it possible in Unity 5 to set a script define, wait for a recompile and then create a build from script?
I am currently writing a build script for a project I am on. I have already written a script that, when fired from a menu, builds for all three of our platforms.
I am currently looking for a way to set the script defines before the build. I am using PlayerSettings.SetScriptingDefineSymbolsForGroup to set the defines, but the recompile does not happen immediately, meaning any builds fired afterwards will use the last compiled dll and a recompile only fires after the build is complete.
EditorApplication.isCompiling doesn't get set to true until after the methods runs. Likewise, subscribing to EditorApplication.update wait for the compile to start seems to delay the start of compilation.
Is there a clean way in Unity 5 to set the script defines, wait for the recompile and continue my script on completion?
Answer by linlinsky · Aug 19, 2019 at 08:53 AM
Did you solved this problem?
What problem are you trying to solve? You can build through unity in the command line.
https://docs.unity3d.com/$$anonymous$$anual/CommandLineArguments.html
Some of the options are the platform, so you could easily write a script that builds all your versions (probably concurrently).
Your answer
Follow this Question
Related Questions
Unity does not parse code properly. 1 Answer
how to remove the unity_editor define in web player 1 Answer
Scripts start to compile when play mode starts 1 Answer
Unity Entering Play Mode Taking 24s In **Empty Project** 0 Answers
Can Unity 3.1 be configured to watch scripts and recompile immediately, like Unity 2.6? 1 Answer