- Home /
Unity clearing my scene when I press play in the editor
Hello Unity community, I am having a problem within the unity editor. Today I was writing a few scripts to spawn in a player using Photon Unity Networking. I do not believe this issue arose from the scripts though. The problem is that when I run my scene in unity, all of the sudden my scene clears itself, removing all gameobjects, child objects, just everything. I have no destroy functions in my scripts. This has been happening for a while and I cannot find a way to prevent it. It justs destroys my scene and I have to rebuild everything, for some reason it saves the scene after wiping so I can't get my saves back. If someone could help that would be great, also I have tried reinstalling unity, restarting my comp, even tried a debugging scene with just a terrain and a camera (not a player) and it still happens. I can't test my scripts anymore in any way. Please help!
Engine version is Unity 5.0.0
Is it the same in a fresh project?
Save your scene and project.
Then, save your scene under a new name to make a copy, preserving the original/
Yes it is the same, I tested it an it happens in every project, except one which confuses me, I have a 2d game that runs properly all of its scenes except when I create new scenes in that project and press play, it gets wiped too.
Reinstall Unity but this time do it in Ad$$anonymous$$ $$anonymous$$ode.
Also make sure to start Unity in Ad$$anonymous$$ mode also.
Okay I will try that, will reply when finished with results.
Check your cameras. If you have more than one and the depth of the secondary camera is higher than the main's, then it is rendered and this is where you're looking through.
Your answer
Follow this Question
Related Questions
How do I change script API reference language in Monodevelop? 1 Answer
Array index is out of range (C#) ? 3 Answers
Send Log file with email? ( IOException: Sharing violation on path) HELP 0 Answers
Setting the transform of an instantiated game object 1 Answer
What are these errors I get when I'm trying to build? 0 Answers