- Home /
Scripts won't compile unless I restart Unity
I can add something to a script, save it and click on the scene, but it won't actually compile. If I restart my scene, as its starting, it will then compile the script. Before you reply, yes, my script is located in the appropriate directory.
Answer by Mike 3 · Jul 16, 2010 at 11:05 PM
I've had this problem plenty of times (mainly on windows). The usual quick fix is to right click any script file (doesn't matter which), and click reimport. It'll compile everything and you should be good to go
Can you answer this mike?Thanks. http://answers.unity3d.com/questions/15631/drawing-ray-for-pathfinding
Unfortunately that isn't working. The only thing that works is reimport all, which restarts unity and actually restarting unity.
Ugh, in that case it's a worse bug than my normal one (though i've seen it before). Don't know what causes it, but yeah, unity just won't refresh the builds at all, and it's a pain
Answer by Juan.du · Aug 16, 2010 at 05:46 PM
I had this same issue on windows.
I solved it by deleting the files from the previous build:
The exe file and the folder named like 'exefilenanme_Data'
Then rebuild and it worked.
Answer by yoyo · Jan 26, 2011 at 01:40 AM
Select Edit menu > Preferences ... and make sure Auto Refresh is turned on. (This may or may not be your particular problem, but would certainly create the symptoms you describe.)
Your answer
Follow this Question
Related Questions
restart game and load a very new scene... 2 Answers
Restarting scene not working properly 1 Answer
Restarting the entire game 1 Answer