Need help with version control

I am using GitHUb for version control and have set it up to show visible metadata and force text in Unity. When cloning the project on another machine my project is messed up as have to add my sprites back to the sprite objects, attach the scripts again, splice sprites again, re-do the animation, etc. Does anyone know what could be causing this and what I can do to fix it?

2 Answers

2

When you upload using git your .gitignore file will ignore several files and folders that don’t need to be versioned. The side effect is that the project will need to reimport and load everything again as it has to regenerate these files. By using the metadata and text options you are effectively embedding the imported information so that next time it is loaded Unity doesn’t just import it from scratch but uses that information.

It could be possible that the metadata file aren’t being versioned to your repo or an incorrectly setup .gitignore file. Those would be the best places to check first.

This was the last [18622-gitignore.txt|18622] I used which seems to work ok for reimporting.

Thanks for pointing that out. I just went back and checked my repo and saw that the meta files were indeed not there and then checked the .gitignore file I was using and noticed .meta was in it. All I should have to do is replace the .gitignore file the one you use and after that it should start syncing the meta file correct?

Yea, if you remove the meta exclusion for your gitignore then push everything back up it should then start syncing them.