Search Unity

Question Prefab instance problem. Missing Prefab Asset when I use git

Discussion in 'Prefabs' started by jpom001, Mar 9, 2023.

  1. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    Not sure what the right forum is to ask this.
    I keep getting the above error on some of my scenes after I commit changes with git. Before I commit I close unity and visual studio and do my
    Code (CSharp):
    1. git add .
    and then git commit
    When I reopen unity some of these scenes have this error, all the scenes are using the same prefabs so. Im not sure why only some get this problem.

    What is causing the missing guid errors, what files should I add to source control, does unity have an official .gitignore file?
    This was one I found online
    https://github.com/github/gitignore/blob/master/Unity.gitignore
     
  2. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    Does anyone have any suggestions for this, I've just lost another 30 scenes because of this error?
     
  3. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    In my folder where my scenes are created. Im creating them from scene templates, a folder is created that seems to have a copy of all my prefabs. Every now and again, this folder seems to disappear for one of my scenes I usually only see this issue after doing a git add. and git commit ?
     
  4. chemicalcrux

    chemicalcrux

    Joined:
    Mar 16, 2017
    Posts:
    720
    I use that .gitignore, yes, so that should not be the issue.

    Perhaps you've added some extra entries to it? If you, for example, ignore .meta files, you'll run into a lot of problems. Each copy of the project will wind up with its own GUIDs, since each instance's editor will see assets without .meta files and import them from scratch.