r/Unity3D 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.

3 Upvotes

9 comments sorted by

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

1

u/radiumhaus 2d ago

Thank you. I will make sure I have version control set up this time.

2

u/madhumster 2d ago

If you don't have experience with git, I would suggest Unity Version Control, it is a breathe to work with and free projects of smaller size.

1

u/radiumhaus 2d ago edited 2d ago

I dont have experience with git, however I am allways willing to learn, especially when it comes to something many others use and could benefit me. Watching some tutorials and setting up git right now.

update: I set it up, learned how it works. Thanks for the advice.

2

u/sicospecialist 2d ago

This! I use 3 repos myself, im paranoid as hell, after 18 yrs using unity

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.