Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Missing Prefabs with freshly downloaded project. (Windows)

Discussion in 'Unity Collaborate' started by HappyBadgerStudio, Jun 17, 2016.

  1. HappyBadgerStudio

    HappyBadgerStudio

    Joined:
    May 6, 2014
    Posts:
    19
    Hey there!

    Checked through the forum and didn't see anything about this one.

    This has happened twice now, on two new machines that have not had the project on it, when pulling down from the cloud, all the prefabs are broken throughout the project and a few other goofy things.

    Seems to only happen on windows machines?

    I have tried forcing Unity to reimport all the assets, I have tried copying the project over via USB from a computer with a working copy, I have tried deleting everything except the assets folder, and none of it seems to repair the missing prefab links.

    If anyone has suggestions, please let me know!
     
  2. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,280
    Hi there,

    Sorry to hear that you're running into these issues. Before we try to figure out what went wrong I was hoping I could get some more details from you.

    Could you go into more detail on how exactly the prefabs are broken? Is it just that the objects in the scene are no longer linked to their prefabs? And what are the other "goofy" things that you're seeing? Lastly, could you submit a bug using the Unity bug reporter? All of that will help us to get you out of this jam.
     
  3. HappyBadgerStudio

    HappyBadgerStudio

    Joined:
    May 6, 2014
    Posts:
    19
    Probably won't have time for the bug report since we are at a con demoing atm, but when we load any scene if there was a prefab present it would just say "Missing Prefab" in red. The other goofy things I would say are probably related to prefabs missing in our game, our generator will start building tracks and continue to delete them over and over again for no apparent reason. Hard to explain exactly what is going on, but it shouldn't be doing that for sure. Haha.
     
  4. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,280
    I understand. I hope the demo went well. Submit a bug whenever you're able.

    I'm afraid that the only way to fix the broken prefab links is to reset them manually. There are a few reasons why broken prefabs can happen. It's difficult to narrow down the exact cause this time without looking at the project itself and trying to repro the bug. But since you said that you were still seeing the broken prefabs even after you copied the project over via a flash drive then it doesn't sound like this problem is related to Collab. Until you send in that bug report, all I can recommend is to review our video on prefabs here, along with the related documentation.

    You mentioned earlier that the prefab links seemed to be broken only on Windows machines. Were you able to download the project from the cloud onto other Mac devices without any issues?
     
  5. HappyBadgerStudio

    HappyBadgerStudio

    Joined:
    May 6, 2014
    Posts:
    19
    Yeah, so far all of our mac computer's haven't experienced this issue. It has happened twice now with Windows however. I've got a few other bugs to report, but it is difficult to create a small version of the project for some of these bugs because it does not happen reliably..
     
  6. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,280
    That's interesting. This definitely sounds like something worth looking into. Unreliable bugs are the worst so I know how you feel. Try to see if you can replicate the broken prefabs bug first with a small project and we'll go from there.
     
  7. sampenguin

    sampenguin

    Joined:
    Feb 1, 2011
    Posts:
    18
    This is happening to me in Unity 5.4.3.f1 from a Windows 7 64-bit project going to a Mac (El Capitan 10.11.6), using git repositories for transfer. Several critical objects are "Missing Prefab" in the scene hierarchy.
    I tried deleting the Library folder and re-opening the project, same result.
    Solution in my case:
    Came across this answer at http://answers.unity3d.com/questions/278326/missing-prefab.html
    "For anyone getting this error after recreating a project from a git repository - make sure the repo has all its .meta files checked in or prefab references can be lost. Contact the creator of the project (or tap yourself on the shoulder if you did it) and tell them to check everything into the repo, then resync your project and watch the errors fade away! Otherwise see the other answers."
    Sure enough, my .ignore file had a *.meta filter for some reason (it was auto generated by my git client).
     
  8. Honikou

    Honikou

    Joined:
    Feb 18, 2013
    Posts:
    89
    I had the same problem and I found the solution !

    One computer used blender for some files. The other computer doesn't have blender, then unity don't recognize theses files and can't make prefab who use them.

    You have to install blender on the new computer, delete your project and reimport all.
     
  9. alonsoali

    alonsoali

    Joined:
    Dec 3, 2016
    Posts:
    1
    This did it for me. Thank you so much.
     
  10. erichoco

    erichoco

    Joined:
    Apr 14, 2013
    Posts:
    1
    +1, this also works for me. Thanks.
     
  11. yoHasse

    yoHasse

    Joined:
    Jul 22, 2016
    Posts:
    15
    Same here! After installing Blender I just right-clicked and selected re-import all and after that it worked!
     
    emathew likes this.
  12. emathew

    emathew

    Joined:
    Jul 31, 2017
    Posts:
    13
    Great fix! Worked wonders!
     
  13. UltimateLoser

    UltimateLoser

    Joined:
    Mar 7, 2018
    Posts:
    1
    I know it's already August but is this issue fixed already? Because in my case, we used a photo rendered from Blender and used it in a project as background.
     
  14. ShLoMiTo

    ShLoMiTo

    Joined:
    Nov 6, 2018
    Posts:
    1
    I'm having the same problem, but I'm not using Blender nor Git repositories, so... I don't know what to do
     
  15. niki_kyl

    niki_kyl

    Joined:
    Dec 15, 2016
    Posts:
    3
    We hit the same problem as well, did you find any solution for it?
     
  16. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    184
    Hey all,

    Sorry to hear that there are more instances of this behaviour.

    Please submit a bug report within the Editor, if you are still experiencing this issue and it is not caused by:
    • Having .blend files within your Project without having Blender installed
    • Your source control management system not tracking .meta files
    Please make sure to add as much detail as you can, along with reproduction steps and screenshots and we will happily investigate the cause of the issue.
     
  17. bennett_apps

    bennett_apps

    Joined:
    Oct 9, 2018
    Posts:
    32
    Same here. It appears that collaborate breaks all prefabs. In the project window, every prefab shows "missing", so every reference to a prefab breaks. My only theory is that it's a problem with different unity versions? Because in my case, one of the computers uses unity 2018.1, and the other 2018.2.
     
  18. TEXMOB

    TEXMOB

    Joined:
    Aug 29, 2017
    Posts:
    4
    i'm having the same problem. after i imported post process package then reopened project it show missing. Please fix it
     
    Last edited: Nov 29, 2018
  19. mert_momad

    mert_momad

    Joined:
    Nov 5, 2014
    Posts:
    1
    Same issue ^. (Seeing a 'Missing' on the prefabs in the editor inspector and can't drag drop them into the scene)

    Nothing to do with Blender though since I used 3DS Max to create my assets and imported as .fbx

    I suspect mine happened after I transferred my project from one Mac to another. Both Macs use MacOs HighSierra. I believe Unity versions are also the same (not super sure though I'll check back home)
     
  20. gele1234

    gele1234

    Joined:
    Oct 23, 2018
    Posts:
    1
    I and my team are facing the same issue as well in few windows machines, they are working properly and in some, they are missing. Were you guys able to solve the issue ?
     
  21. bennett_apps

    bennett_apps

    Joined:
    Oct 9, 2018
    Posts:
    32
    Not yet. this is rather pathetic unity. I hope you can fix this soon.
     
  22. gamedevelopmenttsunami

    gamedevelopmenttsunami

    Joined:
    Oct 1, 2016
    Posts:
    3
    I am having the same problem when importing to a new windows machine (windows 10).

    I first tried to copy over the project by git. When this didn't work because of the missing prefabs I tried just copying over the entire unity folder via USB. Both methods have not worked.

    The unity versions are different and I am prompted to upgrade everything to the latest version after transfer. The library is reimported (or seems to do some loading). When I open the scenes my prefabs are missing inside the scene. Many prefabs also can't be dragged into the scene or a new scene. This is rather frustrating. Keeping the meta files did not solve the problem for me.

    I will try having both set ups have the same version of unity before moving things over to see if that makes a difference.

    If I can't get this to work I will have to just keep working on the old computer since I am not able to transfer my project successfully.

    ------------ My Solution -------------------

    I was able to fix this by updating the original Unity Client I was copying from, to the latest version, and the Unity version on the target computer to the latest version. Then copying over everything including libraries. It seems to be that reimporting the libraries is somehow breaking the prefabs. I was able to get my project working again by doing this.
     
    Last edited: Dec 13, 2018
  23. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,280
    Sorry for the lack of response on this issue. We're still trying to find a consistent repro for the missing prefabs. Are any of you able to repro the missing prefabs with a small sample project or with an asset from the Asset Store? Have any of you tried using the 2018.3 beta yet to see if the issue still repros for you?
     
    RavenOfCode likes this.
  24. gamedevelopmenttsunami

    gamedevelopmenttsunami

    Joined:
    Oct 1, 2016
    Posts:
    3
    I don't know the exact reproduction steps since it is happening to me no matter what I do between these 2 computer, but here is an image of what the missing prefab looks like in the inspector.
     

    Attached Files:

    Last edited: Dec 12, 2018
  25. lucaslosi

    lucaslosi

    Joined:
    Oct 17, 2017
    Posts:
    5
    Having the same issue here. Just downloaded the project on a new computer and got the same problem
     
  26. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    865
    I'd just like to add I've got the same issue. I currently don't have access to my computer which I do all my dev on, so I can't test if I uploaded it improperly, however it does seem that many of the prefabs are missing from the prefabs folder. I can try and submit a bug report or something when I get back (a few weeks).
     
  27. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    146
    Why the thread is marked as solved?

    I'm using git repository and sometimes an user edits a prefab, I don't know why Unity updates the GUID in the meta file, but the scenes that refereces this prefab are not updated. Then the user commits the file and this prefab's reference is missing in the scene files. Even in the machine of the person who changed the prefab, the references are missing, seems like Unity does not update the scene file when the GUID are changed.

    I think GUID was not supossed to change. In my project I add a Temp folder so the artistis can add some artwork files before commiting to the repository. Meta files are created to those files, but they are no sent to the repository. Maybe it could provoked a GUID conflict.

    What do you think?

    All users are using Windows 10 and Unity 2018.2.8f1.
     
  28. bennett_apps

    bennett_apps

    Joined:
    Oct 9, 2018
    Posts:
    32
    Will test to see if this problem persists with 2018.3.
     
  29. simonrcodrington

    simonrcodrington

    Joined:
    Aug 25, 2018
    Posts:
    1
    I've been following this thread for a while and wanted to update anyone who might be in my situation.

    I've been committing changes to a private GitHub repo on my primary computer (Windows machine). I wanted to build my game for Mac OS so I setup a new Mac and pulled the project files from the repo.

    This all seemed to work fine, however when loading Unity it showed hundreds of errors, most of which were about missing metadata. I thought maybe I wasn't committing the right files when I pushed.

    All of my prefabs contain Blender models. All of these connections were broken (missing model when viewing prefab). I took the advice on here and downloaded Blender also. After re-importing the solution and re-loading the game, it all works just fine.

    If you're using Blender to generate the models and you've dragged them into the solution (instead of exporting them as FXB) then you also need Blender to run. There's no warning about this and without this thread I would have been stuffed.

    Hopefully this helps someone.
     
  30. sami1592

    sami1592

    Joined:
    Sep 18, 2013
    Posts:
    50
    So, for my case this happens whenever I am cloning a repo via git.


    From what I understand the Unity Project needs
    .meta
    files to handle the prefabs correctly. So that should mean in the
    .gitignore
    file there should be no mention of
    .meta
    files. Is that correct? But the other software (e.g. Visual Studio) could also generate
    .meta
    files which should be not committed. So, how should a
    .gitignore
    file look like for Unity?

    This is the
    .gitignore
    for Unity provided from Github itself which includes
    .meta
    files. What adjustments should we make here?

    Thanks in advance.
     
  31. Dazdingon

    Dazdingon

    Joined:
    Sep 6, 2012
    Posts:
    6
    I had a similar issue : missing prefabs in the scene (and prefabs themselves are broken)
    Cause of issue : different versions of Unity (The new prefab system is not backwards compatible)
     
    RavenOfCode likes this.
  32. MohammedHababeh

    MohammedHababeh

    Joined:
    May 10, 2019
    Posts:
    1
    you just saved me a lot of time. Thank you
     
    Ponyom likes this.
  33. Charly_games

    Charly_games

    Joined:
    Apr 15, 2018
    Posts:
    1
  34. Ponyom

    Ponyom

    Joined:
    Sep 23, 2018
    Posts:
    1
    super tips thank you, you saved my time.
     
  35. Anagr

    Anagr

    Joined:
    Oct 1, 2016
    Posts:
    18
    Faced with this issue too. Transferred project by Git from Win to macOS. Unity 2019.2.0f1 (Win) and 2019.2.2f1 (macOS).

    I have no idea what to do. The installation of the Blender doesn't help. The image shows an Editor's console logs.

    UPD
    Prefab marks with white font color and has an icon of a blank file (instead of a blue cube)
     

    Attached Files:

    Last edited: Sep 17, 2019
  36. Anagr

    Anagr

    Joined:
    Oct 1, 2016
    Posts:
    18
    After a half of an hour, I found a solution which works for me:
    1) Go to the machine where the project is working (in my case it is Windows).
    1) Duplicate the prefab on the scene in the Hierarchy.
    2) Unpack prefab completely by right-click on prefab and choose the needed option.
    3) Rename the unpacked prefab and move to Prefabs folder
    4) Commit and push changes in source controls tool to the repo
    5) Go to the machine with the "broken" project
    6) Discard old changes (if you have)
    7) Pull new changes.
    8) Delete broken prefab in the Prefabs folder and replace broken gameobjects in the scene with the new one.

    Hope it will help someone.
     
  37. felixmann

    felixmann

    Joined:
    Feb 16, 2017
    Posts:
    2
    My project was working fine yesterday, this morning some of my nested prefabs have this "Missing Prefab" issue.

    I don't use blender and my git repo has all the .meta files.

    I've tried restarting Unity (version 2019.1.10f1 Personal), reverting to a previous place with git and restarting Windows.

    Now I guess I sit down and fix all my prefabs, and hope that this issue doesn't happen again.