描述 : 添加一个指定名称的动画剪辑。
参数 : addLoopFrame
描述 : 在firstFrame和lastFrame之间添加动画剪辑,新的动画剪辑也会被添加到名称为newName的动画中。如果已存在具有相同名称的剪辑,会被替换为新剪辑。
using System.Collections;
void Start() {
anim = GetComponent<Animation>();
anim.AddClip(anim.clip, "idle", 21, 30, true);
}