Brian just got bit by this - he was running the game, making a bunch of edits to the ambient sounds as he went, and then he stopped the game and all his changes went away. Unity tricks us - it makes it look like we can edit our levels live but since it would be hard for Unity to tell which edits we made and which ones were part of the running game, those changes go away when we halt the game. It's still very useful to be able to edit things live to tweak them until they're just so, or for debugging purposes, but we have to remember to copy those changes we make before stopping execution. Often I'll edit the game in play mode without even realizing I'm doing it and lose my changes that way.
General rule is try not to edit stuff while the game is running - just like the olden days it's edit - run - edit - run. But if you want to tweak something while the game is running to iterate on it quicker, you can then copy the component you're working on - right-click the title of the component, "AudioSource" for example, and 'copy' will be an option there. Then you can stop the game and its values will revert but then you can right click on it again and "Paste Component Values". That just became available in Unity 4, I think, so it's better than it used to be.
If you changed multiple components on an object, you can copy the whole object, then after stopping the game, delete the old one and paste in the new one. (By right clicking in the Hierarchy window.)
What I do is, go to Preferences > Colors > Playmode tint And change it to Red.
This will make the whole interface red when you are in play mode.
Then after a few days I change it to white or black because red is overpowering. Then I forget again and change it back to red as punishment for forgetting.
Posted by: SmilingRob | June 27, 2013 at 09:50 PM