- Home /
What else happens after the compilation cycle?
I have a pretty large project (around 100GB), with a large amount of scripts, both my own and third party. My compilation times have been around 30-45s, which is pretty annoying. I tried using the new assembly definition system to improve this. However, even when I put a single test script into its own assembly definition (but still in this big project) and change it, it takes about 25s to finish the compilation cycle. And yes, I put all the other scripts in assembly definitions too.
Most of this time is spent with the little wheel not spinning but stuck in a single position. Any idea what's happening during this time? I know that some of the third party scripts do initialization at "load time", which I think gets called after every compilation. But I doubt that explains 25s... I also read that Unity is doing some kind of checks with all assets that use scripts. This must include even scripts that were not compiled, because my test script isn't connected to anything. But if that's the case, then it seems to be pretty badly designed.
Am I missing something? Anything I can optimize here?
Are you sure you talk about script compilation? Script compilation happens as soon as you swtich back to unity and usually just takes a fraction of a second, even for larget projects. If you talk about build time then yes, that's a quite normal time for large projects. In my test project i have 350+ scripts with a total size of 1.6$$anonymous$$B pure code. It compiles in a split of a second. The script compilation time should only be a $$anonymous$$or part of the build time.
Your question isn't clear what time you actually talk about so you should be more clear in your question.
Your answer
Follow this Question
Related Questions
Moving file failed 2 Answers
Reference Assembly-CSharp from within a custom Assembly Definition 0 Answers
FileNotFoundException (System.reflection) when using SmarFox2.dll 1 Answer
Asmdef and custom conditional compilation symbols 0 Answers
Unity Entering Play Mode Taking 24s In **Empty Project** 0 Answers