It’s not the first time this happens and I hate to roll back all the project. When upgrading, sometimes the meshes on prefabs go missing. Here is a picture:
But if I check the dates of the fbx or the prefab or of the .meta files associated with them, they haven’t changed a bit. I was hoping I can just get that prefab and roll back that one particular file, but it seems that’s not the case.
So I guessed it’s a metafile file somewhere in the library folder and I went look for the GUID of the file into library… same thing, the GUID file there hasn’t changed a bit either.
Any idea where is this stored and how i can pinpoint that particular file to roll it back and possibly bug report it?
the whole project is fine, just randomly missing meshes after upgrade. (btw this also happenned during the 2018.3 and 2019.1 cycle, i was never able to reproduce it on a constant basis so I’m trying to figure out which is a particular file for this).
The mesh reference is stored in the prefab file itself. Open the .prefab file in a text editor (or your code editor). Make sure that you have set your project to have “visible meta files”, otherwise this’ll be hard to debug.
The reference contains the guid of the .fbx file containing the mesh, as well as the local id of the mesh in that file. The localID is defined in the fbx’ meta file.
So, your perfab file will have an entry like this:
SkinnedMeshRenderer:
// a bunch of stuff
m_Mesh: {fileID: 4300012, guid: bbcdb2cf2e122a54ca269ac91bc2910c, type: 3}
The guid there is the guid of the .fbx. The .fbx.meta file will have a list like this:
fileFormatVersion: 2
guid: bbcdb2cf2e122a54ca269ac91bc2910c
ModelImporter:
serializedVersion: 23
fileIDToRecycleName:
// a bunch of stuff
4300012: artist_female_body_b_low // this will be the name of the mesh
You can check if anything of this changes during the version changes. It looks to me like the localID of the plane’s body is wrong, but I don’t know exactly how.
One more thing:
If you checked everything that Baste said above and it looks alright but the prefab is still broken, it’s worth a shot to try to reimport the prefab.
There can be dependency changes where the prefab might not auto-reimport.
The problem is that only partial parts of the meshes are missing. So the GUID for the file is correct, but not the mesh part.
Example, the file: airplane.fbx, which has windows, wings, wheels…
The gameobject display the wings, but windows and wheels meshes are missing. I go into the prefab and I see the GUID for the fbx, which is correct. But I don’t see why windows and wheels are missing.
A reimport does nothing. That’s the first thing I’ve tried. Also the prefab files and everything hasn’t changed, not a single bit. Version software told me they haven’t been changed in months.
yeah i checked the mesh and it’s exactly the same issue, it’s when the submesh has the same name. Anyway, where is this info stored and why would it be lost if the meta/prefabs hasn’t changed on the updates?