- Home /
GIT seems to be losing some scene data
This seems to happen more or less randomly, maybe with only new UI stuff. I had an UI solution that had 5 panels, each panel had a couple of buttons and an image (Sprite Renderer). When I pushed the whole thing (With the gitignore files advertized ~everywhere the default ones) and pulled a fresh copy, the image elements were still there, but the sprites did not populate them.
Where is this data stored or is this a stupid user error?
Answer by Tourist · Dec 05, 2014 at 10:38 AM
activate source control (with meta files for instance) inside Unity.
force the serialization to use text files.
Be sure to do "File/Save project" before commit to Git or any source control. It will force assets to be written on the disk.
Make sure all files in Assets folder are saved (including sub folders).
Make sure all files from project settings are saved too.
If your project meets these requirements, there is no way Git or any source control will "forget" things to serialize.
Yeah thanks. I don't know why it was with my previous project but something was wrong there. Perhaps it was a missing file that ended up in the ignore list or perhaps it was something else. There is some stuff that is lost or wonky, such as multiple sprites having the same sorting order on a layer being rendered in different order, but this seems like data that should not be saved in the first place (as I should be setting the sorting layers if I wanted to explicitly deter$$anonymous$$e the order)