How do I check if an animation clip exists in the controller attached to the animator component?
When a clip doesn’t exist I get an error.
Animator.GotoState: State could not be found UnityEngine.Animator:Play(String).
So I need something like
if(hasClip("idle"))
GetComponent<Animator> ().Play ("idle");
I know of Animation but that is deprecated, so how do I do this with Animator in Uity 4? I am not using Legacy.