Lucas Meijer

Game Development Consultancy

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.

5 Responses to "Oh no! I spent 20 minutes tweaking stuff, while Unity was running."

1 | Benoit FOULETIER

April 19th, 2009 at 10:38 am

Avatar

The copy-paste trick is indeed cool, only problem is it breaks prefab connections.
BTW, did you know you can copy-paste across different scenes? same problem though.

2 | Hanford

April 21st, 2009 at 12:41 am

Avatar

quick note: Some changes will be preserved anyway, like materials and terrain edits.

3 | Martijn Gerkes

April 23rd, 2009 at 5:54 pm

Avatar

if the object you tweaked is a prefab, press apply a couple of times to save changes that will stay EVEN if you stop play mode

4 | diamondTearz

May 19th, 2009 at 4:27 pm

Avatar

Thanks!! Wish I had come across this a few weeks ago!! I’ve got it now though!! I tried doing the full screen on play to prevent this but I always manage to get around that and do some edits anyway!

5 | Jeff 'PsychicParrot'

May 31st, 2009 at 11:05 pm

Avatar

There really should be a button in the editor to store changes that are made during playback.. it can be the most frustrating little monster sometimes and even when you know the regular behaviour it’s still easily done – copy and pasting is great, but most times I’ve done it I haven’t realized until AFTER I hit the stop button lol

Comment Form

Game Development Consultancy

Hi. I'm Lucas Meijer. consultant on game development projects I work at Unity. You're looking at my portfolio website.

Please look around, and take a look at my work, my thoughts or more general information about myself.


If you have any questions regarding consulting, licensing of games, or anything else, feel free to email me at lucas@lucasmeijer.com

Contact Info

Lucas Meijer
lucas@lucasmeijer.com
lucasmeijer on twitter
ljmeijer on skype