- Home /
Importing Iteration Every Time I Compile
I recently upgraded to Unity 2019.4 (in order to gain access to android API 29 for google play). Now, every single time I compile I have to wait about 30 seconds for "Importing (Iteration 2)". This significantly reduces my productivity, obviously. How can I fix?
Answer by rodeowild · Nov 24, 2020 at 08:15 PM
Reverting your project to the V1 asset pipeline fixes this. To do this:
Edit > Project Settings > Editor > Asset Pipeline: Mode dropdown - Version 1 (deprecated).
I do not know what depreciation means on this context. So far it seems to work, though I may run into some nastiness in the future and someone pretending to be in the know will be able to claim "I told you so" with a smug look on their face. Regardless I am adventurous, and am willing suffer the unknown cost of "depreciation" for the moment.
Sarcasm aside, if someone wants to fill me in on what can happen using the old asset pipeline, I would be more than grateful.
This answer worked for some time, but Unity 2020.* no longer appears to support the v1 asset pipeline (switching back to it is not an option so the workaround is no longer valid for recent versions). I'm still having this problem on both script compilation and when pressing 'play' in the editory. Any additional answers/comments are highly appreciated.
Answer by marchall_box · Jun 20, 2021 at 11:38 AM
I had the exact same issue.
I solved it by removing :
private void OnValidate() {...}
It is an internal function that gets called as the value in inspector or script is loaded (https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnValidate.html)
This was called everytime I save (ctrl + s) for all the corresponding objects and I had a function that controls the different gameObject active/deactivate. It was somehow affecting all the root_orders of any prefabs that I didn't even touch.
As I remove them from OnValidate, it's all gone completely.