Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fresh install of project via git breaks all prefab links

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

  1. gdbjohnson3

    gdbjohnson3

    Joined:
    Mar 11, 2018
    Posts:
    13
    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.

    G
     
  2. Koesys

    Koesys

    Joined:
    Jul 20, 2015
    Posts:
    18
    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.

    Cheers