How does auto refresh works?

We’re having a project that a single line edit would take like 3 minutes for Unity to auto refresh. I tried Process Monitor to see what’s going on with this, seems Unity iterate through all files under the project folder and then compile all source codes (our project is using UnityScript). Is this the normal behavior? What can we do to make it faster?

Thanks in advance.

For starters, you could switch to C# - and maybe move some of your codes to external Dlls. A lot of people had big differences when they switched to C# (See this).

Basically, what you’re asking about is called an assembly reload. What happens is that all objects in managed land gets serialized to the C++ unmanaged side created an internal representation of it, and destroyed from the managed. Then the assemblies get reloaded (the first-pass, second-pass dlls, etc) - Then the data gets deserialized back from unmanaged to managed land (which is why if something doesn’t play with unity’s serialization system well, doesn’t make it back to managed side)

See this video and this post for more information on assembly reloads and serialization.