Search Issue Tracker
FBX References to prefabs and scripts are lost after upgrading project to 2019.2.2f1 and above
How to reproduce:
1. Open the attached project ("FBXImportBugReport.zip") in 2019.2.1f1
2. Open SampleScene scene
3. Select Helper Game object in Hierarchy
4. Open Inspector window
5. Click "do it" on Collision Filer Unity Update component
6. Close the project and open/upgrade it to 2019.2.2f1 or above
7. Open SampleScene scene
8. Select Helper Game object in Hierarchy
9. Open Inspector window
10. Click "do it" on Collision Filer Unity Update component
Expected result: References to prefab are not lost
Actual result: References to prefab are missing
Reproducible with: 2019.2.9f1, 2019.3.0b6, 2020.1.0a8
Not reproducible with: 2019.3.0a11
Not tested with: 2019.2.0f1 and below (backward compatibility not supported)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- UI Toolkit's MinMaxSlider snaps unexpectedly in Runtime
- [2D] [URP] Objects are rendered twice when Foremost Sorting Layer is enabled
- Physics applied to Rigidbody is not fully disabled when setting the Rigidbody to Kinematic
- Scene view turns black when using a custom Mesh Renderer
- VFX Graph ZWrite has no effect when using URP PostProcessing DoF effect
Resolution Note (2020.1.X):
TL;DR: Some wrongly generated localFileId were accessible as references in projects during 2019.1 and got fixed in 2019.2.2f1, here is a script (https://github.com/bastienunity/PlayGround/blob/master/Assets/MeshLocalIdFix/MeshLocalIdFix.cs) you can run in your project after upgrading to 2019.2.2f1 and re-importing everything that will edit your scenes and prefabs and replace all the missing Mesh references to the imported Models.
In 2018.4 and before Unity used an old sequential versioning that was not really deterministic and may introduce missing references when iterating in the FBX hierarchy.
We fixed that problem coming into 2019.1 by introducing a new way to calculate the fileID that was not sequential anymore and thus better at dealing with hierarchy changes (mostly, adding new nodes in the FBX hierarchy does no break the old node references anymore).
Unfortunately, the Mesh migration went wrong and unnoticed for several months which resulted in old assets using the new generation for Meshes instead of keeping the old one. The fix for it went in during the 2019.3 beta and in 2019.2.2f1.
At that point, the Meshes are now generated with the old Ids as they should have from the beginning and that is fixing every projects migrating from 2018.4 that couldn't update to 2019.1 and had to wait for 2019.2.2f1 to upgrade correctly.
The problem we have now is that some user used imported Models from 2018.4 or before in a 2019.1 project without noticing the references problems and started using them in their prefabs and/or scenes, referencing to the new Mesh instances that should have never been there. Upgrading to 2019.2.2f1 revert those Ids to the old format and thus lose the new references that were made during the 2019.1 iteration.
We are very sorry for that inconvenience and as a workaround solution, we provide this script (https://github.com/bastienunity/PlayGround/blob/master/Assets/MeshLocalIdFix/MeshLocalIdFix.cs) that is replacing references in the project files and should fix all of them in 2019.2.2f1 and newer versions of Unity.
The script only has to run once in the project and can then safely be removed.