Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved NullReferenceException in Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.AppendMesh

Discussion in 'Physics for ECS' started by MNNoxMortem, Nov 21, 2020.

  1. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.AppendMesh (Unity.Physics.MeshCollider* meshCollider, Unity.Mathematics.RigidTransform worldFromCollider, System.Collections.Generic.List`1[Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent+DisplayResult]& results) (at Library/PackageCache/com.unity.physics@0.5.1-preview.2/Unity.Physics.Hybrid/Utilities/DebugDisplay/DisplayCollidersSystem.cs:178)
    3. Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.AppendCollider (Unity.Physics.Collider* collider, Unity.Mathematics.RigidTransform worldFromCollider, System.Collections.Generic.List`1[Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent+DisplayResult]& results) (at Library/PackageCache/com.unity.physics@0.5.1-preview.2/Unity.Physics.Hybrid/Utilities/DebugDisplay/DisplayCollidersSystem.cs:325)
    4. Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.BuildDebugDisplayMesh (Unity.Physics.Collider* collider) (at Library/PackageCache/com.unity.physics@0.5.1-preview.2/Unity.Physics.Hybrid/Utilities/DebugDisplay/DisplayCollidersSystem.cs:342)
    5. Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.BuildDebugDisplayMesh (Unity.Entities.BlobAssetReference`1[T] collider) (at Library/PackageCache/com.unity.physics@0.5.1-preview.2/Unity.Physics.Hybrid/Utilities/DebugDisplay/DisplayCollidersSystem.cs:337)
    6. Unity.Physics.Authoring.DisplayBodyColliders+DrawComponent.OnDrawGizmos () (at Library/PackageCache/com.unity.physics@0.5.1-preview.2/Unity.Physics.Hybrid/Utilities/DebugDisplay/DisplayCollidersSystem.cs:575)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    8.  
    For a second everything worked, no idea what I have changed as it is not visible from my git log for some reason, or I do not recognize it and now Unity.Physics and Havok is completly broken again. Opening Havok Visual Debugger, now 100% of the time crashes the Unity Editor.
     
  2. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    Wow.... for some reason the Unity.Physics package reverted from 0.5.1-preview.2 back to 0.3.... and that caused stuff to break.
    upload_2020-11-21_19-41-1.png
    After manually fixing it back to the latest version everything seems to work again...

    Edit: And if someone wonders why I stated "it is not visible in the git log": Unity seems to not always flush that to disk until you save something, like the scene or some update in the package manager that causes manifest.json and packages-lock.json to update.
     
    Last edited: Nov 21, 2020
    petarmHavok likes this.