public bool IsPlaying (string name);

Description

名称为 name 的动画是否正在播放?

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Animation anim; void Start() { anim = GetComponent<Animation>(); } void OnMouseEnter() { if (!anim.IsPlaying("mouseOverEffect")) anim.Play("mouseOverEffect"); } }