Search Unity

Bug Prefabs lost some mesh references

Discussion in 'Prefabs' started by Vertette, Jun 24, 2020.

  1. Vertette

    Vertette

    Joined:
    Feb 12, 2019
    Posts:
    2
    I have recently cloned the repository of a friend's game, but there are some issues on my machine which are not present on his end.

    Not all model files seem to import correctly. Some prefabs lost their references to the model in the MeshFilter component, and some models also no longer have their references to the materials they referenced in the "On Demand Remap" section. This only affects some models and prefabs and it seems rather arbitrary. Even within the same prefab using a single model file, it's possible only one submesh went missing.

    All prefabs, models and their respective metafiles are in source control and synced correctly. The meshes are all part of the same *.blend file. Most model files are *.blend files, but we also had models go missing which were imported as *.obj, so the file format appears to be irrelevant.

    This issue occurred on 2019.4.0, and upgrading to 2019.4.1 did not resolve it. We tried recloning the repository and reimporting all assets, but the issue persisted and the models affected remained the same.

    Here are some examples:
    1.png
    As you can see, the GUIDs still match, but the materials are no longer referenced.

    2.png
    Here's an example of a prefab made from a single *.blend file. The model is mostly intact but one submesh went missing.
     
  2. Vertette

    Vertette

    Joined:
    Feb 12, 2019
    Posts:
    2
    OK, so I got it to work. Turns out the problem was twofold - I just had to downgrade Blender from 2.83 to 2.79, delete the cache and rebuild the assets to fix the stage models. The background models didn't load because Sourcetree ignores .obj files. How arbitrary.
     
    Last edited: Jul 2, 2020