The most needed feature!

Seriously, this is the most urgent feature that Unity needs, and has since I started using Unity in 2.6. When you edit the game during play, when you click the play button to end the game you loose all changes. Instead a popup should come up asking you to save the scene with changes. So many times has this happened to me its crazy.

The only way I know to save the work is to make prefabs of the work then re-add them to the scene.

Yea, it’s quite baffling that they didn’t implement it from the start.

I agree.
There have been many, many times where I wished Unity had that feature.

I disagree. That could break the whole project. You can copy component values as a whole now, which is enough.

It would be hard to implement, because the system doesn’t know the changes you did or the gameflow did.

I understand Unity needs to reset the game state when exiting play mode, otherwise it would be a mess (I remember the Aquaria editor worked like this, it was not a good thing).

But when we do changes in Scene view while in play mode, could it not tell the properties have been modified manually and not restore them ?

I wouldn’t like to have a popup every time I stop the scene… but I’d like a way to save current state of things.

Sometimes I want to save some values, and I have to open notepad and copy and paste everything twice… it’s time and energy consuming!

Isn’t there a Plugin/Asset in the Store exactly for this feature?

If not, it’d make a good asset. But I’m not sure how it’d detect the user interacting with the Unity gui.

Found it: PlayModePersist – Unity Asset Store | AlmostLogical.com
I think that should do the job. But, to be honest, I didn’t try it, thoug it seems like a neat tool!

I think the best option would be an option that you click to retain changes on a per-gameobject or per-selection basis. The biggest issue is all of the values that are changed programmatically. So you want to save the changes you made… which is fine… but what about the changes that were made due to AI or other code? If you have an NPC that starts at location 0,0,0 and after you press play he does fifteen jumping jacks, a somersault, and then sprints to position 10, 0, 10… how is Unity supposed to know that you don’t want that data saved as well?

My solution would be: a small thumbtack icon appears on the left side of the gear icon on the component when you modify it, if you click there the changes on that component would prevail when you quit the play test mode…

Bah… can’t believe I didn’t think of that!! THANK YOU!

++1

Play mode persist works quite well, I’ve used it on occasion. Not certain if it works with the current version best check the latest release date if anyone decides to pick it up.

There was actually a bug a while back (I think a 2.x release) that would allow you to sometimes save playing scenes. I forget what the steps were to encounter this bug, but its existence caused me many headaches every time it happened. I’d end up saving things like objects that had fallen off the edge of the world, objects that deleted themselves on Awake(), etc.

That said, there are some tools on the Asset store that provide an organized form of this functionality and mostly work pretty well. I’d personally like to see an checkbox (or a record dot or something) next to each component name which only appears while playing, and which, when checked, causes the changes to persist after play has ended.

Lately though, I haven’t really had much need for this kind of functionality, as I build most of my objects as prefabs and simply edit the project view versions.

Edit: I think the bug came up when you tried opening another scene during gameplay. The “would you like to save your changes” dialogue would pop up and when you clicked “yes”, it would save before stopping play. Not 100% sure on this, but I know the process involved that save dialogue.