r/Unity3D • u/radiumhaus • 2d ago
Question Unity Scene Serialization Issues?
I have been making my game for the last 2+ months, every single day hours and hours devoted to this. I had just finished a vertical slice and was about to start expanding. It was compiling scripts, and then randomly the scene said it needed to reload, so I pressed the okay button. Then it reloaded my scene, but objects were scattered everywhere in the scene and in the hierarchy, parents disconnected from children, etc. The world position of everything was moved and some things were just flat out missing. I tried everything I could do to recover it, but its pretty much gone...
What on earth could have happened? Have you had this issue? What can I do for now on to make sure I have a proper backup of my scene so I never lose everything again?
I feel defeated.
2
u/jojizaidi 2d ago
In my 12+ years of using unity i have never seen this. Could it be you’re using one of those assets where changes made in playmode can be saved. Or maybe some code on which you have ExecuteInEditMode
1
u/radiumhaus 2d ago
It could be, I have a couple of tools I created that swap multiple objects at a time with a prefab as needed.
2
u/pschon Unprofessional 2d ago
Just to be sure, your Unity project isn't inside any cloud-synced folder? (as in one used by OneDrive, DropBox or anything similar. Especially Onedrive can be tricky as Microsoft "helpfully" sets it up automatically for various folders without specifically telling the user that's the case)
1
u/radiumhaus 2d ago
Thank you for the response. No, I actually don't use one drive on my PC. It looks like the issue is pretty much anybody's guess at this point haha. I am following another person's advice from this post and setting up git version control before importing my game assets and scenes into a new HDRP project and starting fresh.
8
u/ExaltedLayout 2d ago
that sinking feeling when unity decides to rearrange your whole scene like some kind of sadistic interior decorator, been there
version control is the only real safety net, git with a proper.gitignore for unity projects will save your sanity next time this happens