# keepAnimatorControllerStateOnDisable

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

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AnimationModule

> **Warning:**
>
> **Deprecated.** keepAnimatorControllerStateOnDisable is deprecated, use keepAnimatorStateOnDisable instead.
>
> **Upgrade to** [Animator.keepAnimatorStateOnDisable](/engine/6000.7/script-reference/unityengine/animator/keepanimatorstateondisable.md)

```csharp
public bool keepAnimatorControllerStateOnDisable { get; set; }
```

### Remarks

This property is obsolete, use [\_keepAnimatorStateOnDisable](/engine/6000.7/script-reference/unityengine/animator/keepanimatorstateondisable.md) 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](/engine/6000.7/script-reference/unityengine/animations/animatorcontrollerplayable.md).
