- Home /
LockReloadAssemblies does not work after BuildPipeline.BuildPlayer call
I have a process running through my build process to build my game to the various platforms I am deploying to, and then upload the web player build to my web site. I'm trying to get this to be fully automated, but when Unity automatically recompiles my code it clears out all my static variables used in the process. Realistically, the only static variable I need is an IEnumerator that records the process and the event registered to EditorApplication.update. Both of these seem to be cleared out by the script reloading. I've been trying to use EditorApplication.LockReloadAssemblies to solve this, but it appears to have no affect. Halfway through my WWW upload the scripts finish reloading, the variables are cleared out, and I'm left with a half-filled upload progress bar. Is there a solution to this? Can I fend off the automatic assembly reload?
I'm getting the same issue. Were you ever able to resolve?
Answer by Jason-King · Sep 14, 2013 at 10:22 PM
I was able to solve this by testing for EditorApplication.isUpdating and EditorApplication.isCompiling. If either are true, then I wait before continuing on to the next phase of my build and publish process.
Your answer
Follow this Question
Related Questions
None existent object instance getting updated on recompile while playing. 1 Answer
Force Unity to recompile scripts 8 Answers
ScriptChangesWhilePlaying option "Stop Playing and Recompile" not working as expected 1 Answer
How to setup code so it can recompile without null exception while running 1 Answer
Recompile project after .rar? 1 Answer