Search Issue Tracker

Fixed in 2018.2.X



Found in


Issue ID




Null Ref exception on UnityEditor.Graphs.ParameterControllerView.AddParameterMenu



Was working on setting up the Animator and I deleted a parameter. Afterwards, I keep getting this error and I can't add any more parameters or interact correctly with the Animator Window. Undo did not get the error to go away.
Issue goes away by re-opening the Animator window.

Repro steps:
- open the simple project I created (
- open the SampleScene, click on the cube object and select a transition. You'll notice the parameter OpenDoor on it. Leave the Inspector open on that view.
- In Visual Studio, try to change the Line 21: if (Input.GetKeyDown(KeyCode.C)) (to say Keycode.A)
- save and switch back into the project
- don't wait for Unity to compile, just right-click on the parameter a few times and attempt to delete it (you don't actually have to delete it, it WILL disappear from the list)

1st error (appears once):
NullReferenceException:Object reference not set to an instance of an object

2nd error (appears once):
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.AnimationStateMachine.GraphGUI.SyncGraphToUnitySelection (Boolean force) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/GraphGUI.cs:310)
UnityEditor.Graphs.AnimatorControllerTool.DetectAnimatorControllerFromSelection () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:730)
UnityEditor.Graphs.AnimatorControllerTool.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/AnimatorControllerTool.cs:743)

3rd error (appears every time I interract with Animator window):
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.ParameterControllerView.AddParameterMenu (System.Object value) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/Animation/ParameterControllerView.cs:584)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:111)

Previously tested on 2017.30f3 and I can't get it to reproduce.

There is a screenshot and a gif attached too.

Comments (1)

  1. Tangruolin

    Jan 28, 2019 02:39

    click on the "parameters"

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.