【转】unity3d 如何得到当前物体播放的动画
原文;http://blog.csdn.net/smilelance/article/details/22285125
public static string GetCurrentPlayingAnimationClip(GameObject go)
{
if (go == null)
{
return string.Empty;
}
foreach (AnimationState anim in go.animation)
{
if (go.animation.IsPlaying(anim.name))
{
return anim.name;
}
}
return string.Empty;
}