Version: Unity 6 (6000.0)
LanguageEnglish
  • C#
Method group is Obsolete

Animator.keepAnimatorControllerStateOnDisable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
Obsolete keepAnimatorControllerStateOnDisable is deprecated, use keepAnimatorStateOnDisable instead.
Upgrade to keepAnimatorStateOnDisable
public bool keepAnimatorControllerStateOnDisable;

Description

Controls the behaviour of the Animator component when a GameObject is disabled.

This property is obsolete, use Animator.keepAnimatorStateOnDisable instead.


Set to true to keep the current state of the Animator controller.
Set to false to clear the current state of the Animator controller.
The default value is false.


This property is serializable and can be saved in a Prefab.
This property applies to the AnimatorController associated with the Animator. This property does not affect AnimatorControllerPlayable.