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
- "Shader warning in 'Hidden/HDRP/DownsampleDepth'" warnings are thrown after building a project
- Scene is not rendered and appears black when the Custom Renderer Feature is utilized
- [ShortcutManager] The Context Menu is not updated in the Shortcuts menu when resolving a Binding Conflict
- [Quest] Foveation Level is 0 when SRP Foveation is enabled
- Freeze when displaying text with "-T" in Play mode
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.