We have an issue with importing some PhysicMaterials causing the editor to crash.
This happens the first time we import the asset and just shows an “inconsistency” warning on the next imports.
The crash is preventing automated build systems because we want to clean the libraries to avoid any issue from previous builds.
I know the issue is already reported here and marked as “fix in review” but there is no release date since may and as we are still using 2020.3.x LTS branch, as long as the fix isn’t released it’s a big issue for us. Do anyone has a workaround ? We can’t delete all PhysicMaterial causing the issue and we have no idea how to detect what is causing the crash on them so we can’t detect them.
This can happen if you open unity files with a newer version of unity, then try to open them with an older version.
Identify one that is crashing, then study the .asset file itself (they’re pretty obvious), and look in your version control for how it might have changed.
Finally try and delete it and recreate it and see how it changes, but SAVE the original .meta file because its GUID connects that meta file to everything.
Here’s what a typical physic material looks like… they’re tiny files you can pull up in a text editor.
contents of file CarSlippery.physicMaterial:
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: CarSlippery
dynamicFriction: 0
staticFriction: 0
bounciness: 0
frictionCombine: 1
bounceCombine: 1```
Some more notes:
Some info about Missing script warnings, GUIDs, renaming GUIDs, etc:
https://discussions.unity.com/t/836322/2
https://discussions.unity.com/t/815173/7
https://discussions.unity.com/t/815173/9
EVERYTHING in Unity is connected to the above GUID. It is super-easy to inadvertently change it by renaming outside of Unity.