Search Issue Tracker
Fixed in 5.0.X
Votes
0
Found in
Issue ID
649281
Regression
No
Animator: having too many states slows down editor
Animator: having too many states slows down editor
I've copy/pasted state nodes till it reached about 1000. At this point editor becomes quite slow-responsive. When I've doubled that number again, at runtime there start to appear error in console:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext.BuildNames () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:44)
UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext..ctor (UnityEditor.Animations.AnimatorTransitionBase aTransition, UnityEditor.Animations.AnimatorState aSourceState, UnityEditor.Animations.AnimatorStateMachine aSourceStateMachine, UnityEditor.Animations.AnimatorStateMachine aOwnerStateMachine) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:28)
UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.ComputeTransitionContexts () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:125)
UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:87)
UnityEditor.Graphs.AnimationStateMachine.AnimatorStateTransitionInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorStateTransitionInspector.cs:55)
We might want to have a warning for a user at some certain number of nodes that 'You might be having performance issues if you'll have more than X nodes...'
Reproducible in Unity 5.0 b14
OS: Windows 8.1 x64
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] The Player freezes when disabling Bluetooth while connected to the headphones
- Addressable bundles are not retrieved from the cache when a WebGL Player is refreshed
- Sprites are incorrectly occluded by Sprite Physics Shape culling when behind in sorting order
- CPU usage is increased when the Editor is idle with the ProBuilder Package installed
- Unstable lighting when additional light sources are added in Shader Graph nodes
tswalk
Sep 03, 2015 04:13
this should be re-opened.... getting the same problem with 5.1.3p1
and I only have one animator controller, two state machines and perhaps 20~ clips
hvirtual
Aug 18, 2015 10:35
Hi,
I am using Untiy 5.1.0f3 and I just got what it looks like the same error.
I have a state machine with several transition and states. Many transitions into a sub-statemachine which also has states and an inner sub-statemachine.
Here is the callstack:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext.BuildNames () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:44)
UnityEditor.Graphs.AnimationStateMachine.TransitionEditionContext..ctor (UnityEditor.Animations.AnimatorTransitionBase aTransition, UnityEditor.Animations.AnimatorState aSourceState, UnityEditor.Animations.AnimatorStateMachine aSourceStateMachine, UnityEditor.Animations.AnimatorStateMachine aOwnerStateMachine) (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/TransitionEditionContext.cs:28)
UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.ComputeTransitionContexts () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:125)
UnityEditor.Graphs.AnimationStateMachine.AnimatorTransitionInspectorBase.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorTransitionInspectorBase.cs:87)
UnityEditor.Graphs.AnimationStateMachine.AnimatorStateTransitionInspector.OnEnable () (at C:/buildslave/unity/build/Editor/Graphs/UnityEditor.Graphs/AnimationStateMachine/AnimatorStateTransitionInspector.cs:57)
GarrusN7
Jul 07, 2015 17:22
I'm using 5.1.1f1 and this started error started to appear after adding 30+ states to 5 mecanim controllers
mangax
Apr 18, 2015 12:42
btw am using latest version of unity 5.0.1f1
mangax
Apr 18, 2015 12:41
Am still having this issue.. same long error while working with mecanim... it happens randomly, and indeed the editor becomes slower and more laggy...
this is haven't been fixed yet..
jhocking
Mar 15, 2015 20:00
I'm using 5.0.0f4 and am getting this error message, although this doesn't seem to be related to the number of nodes and thus may be an unrelated issue.
Ikpil Choi
Mar 12, 2015 10:04
I've got this error.