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
- WebGL build dependencies are not refreshed until the Editor is restarted
- “Audio Random Container” allows adding unlimited number in “Audio Clips” numeric field, causing Editor to freeze
- In Deferred rendering path, mixed lights don't render when enabling "Use Rendering Layers" in the Decal renderer feature
- [Windows] Special characters in file names are sorted to the end of the alphabet in the Project window
- Information box icons are not contained within the information box bounds in Render Pipeline Converter window
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.