Importing Code Repeatedly

From the Department of Yes, There Are Dumb Questions, comes this one: Lately, whenever I make any changes to my code and return to the Unity editor, I keep seeing this window for a few seconds. I work on three computers and never see it on the other two. Anyone know what it is and why I might be seeing it on one machine and not the others?

6933378--814251--upload_2021-3-14_9-1-33.png

I haven’t seen this but I’ve heard rumblings that it is some newer “domain reload” option in the settings that can be turned off. This may have other implications such as ignoring script changes and requiring a specific Ctrl-R to refresh when you do change code… but maybe “unity domain reload” might yield interesting google-able results.

I’ll look into that and report back.

That window I capture is actually the rare second window in a sequence of two. The first (which I am seeing a lot), looks exactly the same, but the title is this:

Importing “Assets\Clazz.cs”

where “Clazz.cs” is the name of whatever file I most recently changed and saved in Visual Studio.

This all seems harmless, but anytime two machines behave differently for no immediately obvious reason, I’m naturally a bit anxious. It also seems to take rather a long time. The files I am working with tend to be tiny. I wouldn’t expect any operations on them to be at all lengthy.

Hmmm, first pass at this suggest domain reload is not involved. Unity manual says this:

I gather the point is to avoid persistent state changes from one run to the next. That’s actually very helpful to know, as I can see it being an issue down the road.

The behavior I am seeing doesn’t wait for me to enter play mode. I see every time I save a change to a C# file in Visual Studio, then return to the Unity editor. First, I see those dialog boxes, then the “wait” cursor while Unity recompiles my code.

1 Like

I’ve seen that as well, though sometimes I won’t see it for many hours, then if I go back to Unity (possibly after the computer went to sleep?) and continue, it starts doing that every time I switch back from VS. Restart Unity, it doesn’t happen again, for awhile.

1 Like