18 Apr, 2009
Oh no! I spent 20 minutes tweaking stuff, while Unity was running.

sounds familiar?
You’ve carefully placed that one light in your scene. Or tweaked your physics settings untill they were just right. Yes that’s it, just a bit more to the right, yes, yes.. yes, perfect!.
And then you realize that Unity is still playing, so your changes will be discarded when you stop playing, and you have to do the whole thing over again.
Welcome to the club, you’re not alone.
What can you do about it?
In Unity2.5, it’s already harder to make the mistake, as the entire IDE gets tinted dark when your game is playing. So think dark->dont-spend-hours-tweaking.
Okay, so in case you forgot, there’s still a way out. There’s a trick to preserve your changes.
While the game is running, select the gameobjects that contain your tweaks, and Copy them. (Apple-C / Control-C) Stop the game. Paste them. Remove the old gameobjects. (Or use the pasted gameobjects to only copy some values from into the old one).
If you’ve already clicked stop, and only then realized your changes are gone now, then… I’m sorry, they’re really gone. If you realize you’re in trouble before you click stop, you can still do the copy/paste trick.