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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Weird bug when selecting a transition arrow in the animator I get an error

Discussion in 'Immediate Mode GUI (IMGUI)' started by bn-l, Sep 23, 2022.

  1. bn-l


    Aug 27, 2022
    When I select a transition arrow I get an error:


    If I deselect it (e.g. by clicking somewhere else), everything is ok.

    This is the full text of the error:

    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.Graphs.AnimationStateMachine.AnimatorStateTransitionInspector.DoErrorAndWarning () (at <2d04a235452d4590a6cba13250127520>:0)
    3. UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.OnInspectorGUI () (at <2d04a235452d4590a6cba13250127520>:0)
    4. UnityEditor.UIElements.InspectorElement+<>c__DisplayClass62_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <8e1306750ec2448cbbffed10b1f389f2>:0)
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    version: 2022.1.17f1.3661

    What I tried to "correct" this (did not work):

    - Restarting unity
    - Deleting the animation and re-adding it to the animator
    - Creating an entirely new animation and repeating above
    - Deleting the transition, the transition condition, etc.