Search Issue Tracker

Duplicate

Duplicate in 2018.4.X, 2019.2.X

Votes

9

Found in

2018.4.0f1

2019.2.0a12

2019.3.0a1

2019.3.0a3

Issue ID

1154716

Regression

Yes

Animator - NullReferenceException when dragging reorderable lists in Layers or Parameters

Themes

-

If you attempt to drag a reorderable list in the Layers or Parameters sections of an Animator window, a NullReferenceException will occur.

NullReferenceException: Object reference not set to an instance of an object
UnityEditorInternal.ReorderableList.DoDraggingAndSelection (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:709)
UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect) (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:595)
UnityEditorInternal.ReorderableList.DoLayoutList () (at C:/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:396)
UnityEditor.Graphs.ParameterControllerView.DoParameterList () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/ParameterControllerView.cs:666)
UnityEditor.Graphs.ParameterControllerView.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/ParameterControllerView.cs:750)
UnityEditor.Graphs.AnimatorControllerTool.OnGUIEditor (UnityEngine.Rect editorRect) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1405)
UnityEditor.Graphs.AnimatorControllerTool.<SetupGUI>m__B () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1675)
UnityEditor.Graphs.AnimatorControllerTool.ScopedOnGUI (System.Action onGUIHandler) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1476)
UnityEditor.Graphs.AnimatorControllerTool.<SetupGUI>m__1 () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:1675)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:297)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:492)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:475)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:465)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:446)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:197)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:289)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:107)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

1. Open Unity
2. Open the attached project
3. Find AnimationController in the Project View and open it
4. Attempt to reorder the layer and parameter lists in the Animator

Expected Results:
You can reorder the lists with no issues.

Actual Result:
NullReferenceExceptions occur when the lists are dragged.

Tested on Windows.

Reproduced on 2018.4.0f1, 2019.2.0b3, 2019.3.0a3

Cannot Reproduce on 2019.1.3f1

Comments (10)

  1. renman3000

    Aug 20, 2020 14:25

    Solution:
    Quit and restart Unity.
    v2019.2.17f

  2. DjBolo

    Nov 08, 2019 13:34

    SOLUTION (thanks to @THEGAMEBOY88 ):

    Just download unity 2018.3.9f1, change the layer and save. You don't need to have a compilable code.

  3. DjBolo

    Nov 08, 2019 11:34

    Found in 2018.4.5f1 personal

  4. TheGameBoy88

    Aug 12, 2019 17:28

    This bug is also present in 2018.3.14f1, but not in 2018.3.9f1

  5. tcz8

    Jul 17, 2019 04:22

    Happening in 2018.4.4f1

  6. aduijs

    Jun 29, 2019 01:27

    still having the same issue in 2018.4.2 and 2018.4.3

  7. eyeskills

    Jun 07, 2019 09:10

    A totally awful workaround is to add an editor button to serialise/deserialise to JSON - where you can more simply reorder lists. All the new advanced functionality isn't helpful, when the basics are continually breaking. Unity's becoming such bloatware than I predict a Microsoft acquisition is just around the corner.

  8. david_unity195

    May 31, 2019 20:45

    Also using 2018.4.1. This is really killing our workflow. Any workaround other than completely redoing an animator from scratch when working with layers would be helpful.

  9. Cbunz

    May 31, 2019 06:46

    Reproduced in 2018.4.1.0f1

  10. AlbertoFdzM

    May 24, 2019 06:36

    It's happening too in MacOS 10.14.5

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.