This is probably a bug in Unity and I just want to see if there’s a quick way to get around it.
I’m using Unity 5.3.6f1.
My “GameScene” had some GameObjects in the Hierarchy window, say “Hierarchy A”.
I changed some of these GameObjects in the same scene and saved it, e.g. rename GameObjects, add GameObjects, add scripts to GameObjects etc. So, now I have “Hierarchy B” in the same scene.
When I start Play mode in the editor the “GameScene” now contains “Hierarchy A”!
After I stop Play mode the “GameScene” now contains “Hierarchy B”!
This is very weird! I don’t even know where Unity finds the OLD data for “Hierarchy A”, since it’s been completely overwritten by “Hierarchy B” in the same scene, named “GameScene”.
I fixed the problem temporarily, by exporting all the assets to a .unitypackage, and re-importing in a new empty project.
All was well for 5-6 times, i.e. “Hierarchy B” remained active in Play mode too. However, the problem is back again.
Is there a way to delete the OLD “Hierarchy A” data, so it doesn’t load in Play mode, or maybe something else I can do?
EDIT: I just discovered that what breaks the quick fix of importing all assets in a new empty project, is changing Project Settings. i.e. whenever the ProjectSettings.asset file changes, the undesirable behaviour comes back. So, if I edit any of the PlayerSettings, such as change the company name, a change in ProjectSettings.asset is triggered, and I get the undesirable behaviour. If I then delete this ProjectSettings.asset file, and restart Unity to re-generate a fresh one, normal behaviour is restored.