Why is Unity importing assets for a couple of minutes on each start?

I work with Unity 8 hours a day in a team of up to 10 developers. It’s pretty natural to see Unity import assets that other developers have added to the project after pulling changes from version control. Especially when working remotely and we don’t share a cache server I don’t expect anything else.

However, I also notice that Unity spends time (around 3 minutes on our small project) importing assets even if no assets have changed. Sometimes, while programming, Unity just randomly starts importing some prefabs or compresses sprites, although I’m just changing code and recompiling. In many cases, this is not on the first enter playmode (I would acknowledge this is some lazy initialization behaviour), but instead, just randomly after iterating on a script and testing in playmode for the 5th time in row.

And secondly, after having worked in the project for a while without any changes and reimport at all, if I close and restart Unity, it start importing assets for 3 minutes again. The loading bar doesn’t specific, it just says “Importing…”.

What’s going on here? Shouldn’t Unity be super fast to re-open because everything is already cached in the library? I’m using AssetDatabase v2 since it’s the new default.

I know this is nothing to reproduce easily and I don’t expect a quick fix, but maybe there’s information about existing issues or how I can help debug these things. As far as I know, I can’t profile or monitor the import process before the editor is open…

3 Likes

I noticed the same thing and not sure where it comes from.