# Unity is reimporting everything! How do I stop that?

I have a relatively large project (about 8GB) and it is constantly reimporting itself over and over, to the point that I spend 80% of my time waiting for Unity to:

• Reimport everything
• Stop hanging.

Even for the smallest of changes (ie. removal of a comment on one line in a script), or changing import settings on an asset can cause these long hangs and reimports.

To make matters worse, this project is also synced over UnityCollabBETA, which throws manual/selective import (auto-refresh is forced on) out the window.

I've also read up that other programs locking asset files (to read them) can also cause Unity to reimport everything as opposed to simply doing a selective import (only reimporting things that has been changed).

I've tried creating blacklists for my auto-backup programs, anti-viruses and anything that would snoop around and/or mess with the Unity Project folders. However, despite those programs not accessing anything, Unity still reimports the whole project every time I alt-tab out.

The only workaround I've found so far is to just kill Unity every time it does it and relaunch it as for some reason it processes the actual changed files first, then hangs itself by going through everything else.

It is also worth noting that I/O is maxed up by Unity (due to the sheer size of the project) and CPU/GPU usage are relatively low (does not exceed 20-30%, assuming nothing else is running in the background).

Note: This has persisted through installs and computers.

# Question

How do I stop Unity from reimporting everything without constantly killing Unity?

• Is it safe to assume you've reported this to the Unity dev team through the bug tracker? Have they offered any suggestions as to the cause? Apr 1 '17 at 12:19
• @DMGregory I haven't as the project is too big to upload (well on my internet connection anyway). Could you point to me where I could do so? (Note: Was banned from Unity Answers by a problematic moderator) Apr 1 '17 at 12:21
• The usual approach here is to create a minimum, complete, verifiable example. So, copy your project and start deleting things bit by bit. If the problem stops, that's a good clue that one of the deleted files had something to do with it. If it persists, then you'll slim down the project to something of a shareable​ size. Apr 1 '17 at 12:23

One option which can in some cases greatly decrease the waiting time after small script changes can be to disable domain reloading and to disable scene reloading in your project settings. You can find this under File -> Project Settings -> Editor. Enable "Enter Play Mode Options" and then leave "Reload Domain" and "Reload Scene" disabled.

However, be aware of the side-effects:

• Any static variables in your scripts will no longer get reset to the initial values when you restart the game. They will only reset when you restart the Unity editor. A possible workaround for that problem can be a [RuntimeInitializeOnLoadMethod] which resets all static variables.
• Any arrays which are exposed inspector properties but have no entries in the inspector, will be null instead of arrays with 0 entries.
• On switching from editor mode to play mode, [ExecuteInEditMode] scripts won't get disabled and re-enabled as usual and there won't be an obligatory OnValidate() call for all scripts either.

None of these behavior differences will affect the game builds, but might result in some unexpected behavior during development.

I am guessing you have some scripts in your project that is causing this, as it is possible to override Unity's default behavior when it comes to importing assets. I would try to copy the project, remove all scripts and see what happens.

If this removes the problem, then looking for any scripts that imports UnityEditor should help narrow it down further