Search Unity

Fresh install of project via git breaks all prefab links

Discussion in 'Editor & General Support' started by gdbjohnson3, Mar 22, 2020.

  1. gdbjohnson3


    Mar 11, 2018
    Hi all,

    I got a new laptop, and wanted to continue my project on the new one. So, I cloned my repo on it, and found that my project was quite broken after opening up Unity. IAP had to be deleted and re-installed, which was survivable tho a bit of a surprise that this happened. More importantly, possibly all my prefab links broke. Many of my links to images are missing, scripts on objects are missing, and prefabs are missing scripts or images. It would take hours to fix it all, with no guarantee that I'd get it back to the correct state.

    I worked around it by just airdropping my entire project folder over, and now it works, presumably since all the meta data copied over correctly. But it is more than terrifying to know that I have a snowflake project setup and that my repo isn't preserving the correct state of my project. God forbid that my laptop gets hit by a bus, and I can't get my project back.

    I don't understand the guts of unity enough to figure out the root cause of this. I understand that there are GUIDs under the hood that drive the linking, but why would these links break with a repo clone? Am I missing critical files in my repo?

    Need some advice so I have a reliable project source code.

  2. Koesys


    Jul 20, 2015
    Hello ! Just got the same problem.

    Actually, I made the mistake to put *.meta inside the .gitignore..... I just got rid of it and now everything works again.