Search Issue Tracker
By Design
Votes
1
Found in
2018.4
2019.3.4f1
2019.4
2020.1
2020.2
Issue ID
1256100
Regression
No
[StateMachine] Reference to StateMachineBehaviour in script is lost after deactivating GameObject with AnimatorController
How to reproduce:
1. Open user attached project "New Unity Project.zip"
2. Open "SampleScene" scene
3. Enter Play Mode
4. Click "Bug me" button
5. Observe Console Window for a few seconds
Expected result: no "Im null!!!!!" message is thrown
Actual result: "Im null!!!!!" message is thrown which means that reference to StateMachineBehaviour is lost
Reproducible with - 2018.4.25f1, 2019.4.5f1, 2020.1.1f1, 2020.2.0a20
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
- Can’t delete gradient keys with Mac keyboard or context menu options
- Editor freezes for a few minutes when closing or switching a VFX window that was opened in a previous project
- UI Overlaps when switching Render Pipeline Asset for different Quality Levels in Quality Project Settings
- Ray Tracing Shader link to the documentation isn’t working
- Warning "BatchRendererGroups currently don't support override shaders" is spammed in Play mode when using H-Trace WSGI with BatchRenderGroups
Resolution Note:
This is the expected behaviour, when disabling a gameobject we need to free all resources including StateMachineBeahviour in the animator.
you need to retrieve SMB everytime that you deactivate/activate the Gameobject.