Animator.keepAnimatorControllerStateOnDisable

切换到手册
public bool keepAnimatorControllerStateOnDisable ;

描述

在 GameObject 处于禁用状态时控制动画器组件的行为。

设置为 true 保持动画控制器的当前状态。\ 设置为 false 清除动画控制器的当前状态。\ 默认值为 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.