Search Issue Tracker

Duplicate

Duplicate in 2018.4, 2019.2

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 (9)

  1. 80faf7cb169fd5f52f604288572a100e?d=mm

    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.

  2. 80faf7cb169fd5f52f604288572a100e?d=mm

    DjBolo

    Nov 08, 2019 11:34

    Found in 2018.4.5f1 personal

  3. 656a37886d989b3046e1e88b2adfb8da?d=mm

    TheGameBoy88

    Aug 12, 2019 17:28

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

  4. 4b409f54d7f61f76c11235a7d138d4dd?d=mm

    tcz8

    Jul 17, 2019 04:22

    Happening in 2018.4.4f1

  5. 0156d1ed4d7f899c80c98e01724c84a9?d=mm

    aduijs

    Jun 29, 2019 01:27

    still having the same issue in 2018.4.2 and 2018.4.3

  6. D5203e2f4fab04aa285ab748d7f5bd82?d=mm

    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.

  7. 71498e5abfb0f75fa7ef3b1d16410e69?d=mm

    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.

  8. 9755d2087179e48818f5c33f7adc3cff?d=mm

    Cbunz

    May 31, 2019 06:46

    Reproduced in 2018.4.1.0f1

  9. 9dea6c723e810876b6fbb55ca9c77dca?d=mm

    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.