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

Animation

-

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

  1. 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.

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.