Why does the Editor open random folders in Project at startup?

Each time I launch Unity, it randomly opens some folders in the Project window. It never keeps the same view as what I had when it was last closed down. It seems to be random, with different folders opening each time.

Is there an option to preserve Project view or similar?
Or is this a bug?
Are you seeing this behavior too?

I’m on Unity 5.3.4.

All right. I took a closer look and it seems that the project folder Unity opens at launch is the one that has been modified last. Example: last time I quit Unity, I had just added an object to a Prefab folder; when I just opened it again, the Prefab folder was open... Not quite random then. Hope it helps!

2 Answers

2

Hi,

Apparently, 5.3.5 keeps in memory what folders were open in the project window when we closed it last time; at least it does for me.

I don’t know about 5.3.4. Sorry.

Ok, thanks. I'll have that to look forward to next time I upgrade.

yes correct I also have another script also

You you get any warnings / errors in the console? When a warning or error is displayed in the console, the source script is “pinged” which will expand all folders to that asset.

That's a good suggestion, but unfortunately, no, nothing in the console. That also made me think to check the Editor.log found here: C:\Users\\AppData\Local\Unity\Editor, but still nothing indicating an error with any of the folders it opened.

That's your problem then. Each time an object is instatiated, the script is run again so each object is spawning new objects, which in turn spawn new objects. Put your script on another object. You could create an empty gameobject and call it Spawner or something.,