启用/禁用该动画。
为使该动画获得任何效果,还需要将权重设置为大于零的值。
如果禁用该动画,则会暂停时间,直到再次启用该动画为止。
using UnityEngine;
using System.Collections;
public class ExampleScript : MonoBehaviour
{
public Animation anim;
void Start()
{
// Enable the walk cycle
anim["Walk"].enabled = true;
anim["Walk"].weight = 1.0f;
}
}