So I had this problem the other day, where my entire scene got wiped off without me pressing the delete button. The scene was supposed to contain a whole game and when I opened the project the next day, it was absolutely empty.
I din’t find any answers on this forum but I finally cracked it! I know why it happens. This is just to give others a heads-up on the issue.
When you press the play button and try to open the same project again, you will get an error message.
Now after you close the error message and press play again (to stop), the scene gets wiped off.
All you have to do is, reload the scene again and DONT save while doing so. Whereas if you save the scene (like me) and go to sleep, you will be a bad position.
The possibility of people doing is this extremely rare but this is one of the causes.
Has anyone else experienced this issue? Or can somebody explain why this issue occurs? Maybe how the internal metadata mapping of unity works?
I have a machine where this happens all the time, very very sucky. I hope Unity finds a way around it. The problem is very agressive malware/antivirus program which is accessing files ‘on write’ and probably ‘on read’ too, so the file is locked by either Unity or that malware checker. I tried to disable the malware thing but it’s a service that restarts itself somehow. Anyway, that’s what’d up. If you can, put your Unity folder(s) on the ‘do not scan’ list of your anti-malware program.
Go to your project folder, move OR delete the Library folder then reopen the project.
It will re-create it.
(Try moving before deleting just encase that’s not it).
It’s happened to me a couple times where the entire project doesn’t load ANYTHING even though it’s there.
Not sure if it’s the same issue, because you said the hierarchy.
But I hope that helps!
I’ve got same bug. After coding some stuff I returned to unity(i was in play mode) and after recompiling code first my camera has become deactivated, even though was a check mark next to the camera name. After saving camera disappeared and settings and references on my scripts resettled. the bug has appeared twice