For some reason, Animation.Play() works, but Animation.PlayQueued() gives me:
“error CS1061: Type UnityEngine.Animator' does not contain a definition for PlayQueued’ and no extension method PlayQueued' of type UnityEngine.Animator’ could be found (are you missing a using directive or an assembly reference?)”
Any thoughts about what I’m doing wrong? Thanks in advance!
using UnityEngine;
using System.Collections;
public class TestScript : MonoBehaviour {
public Animator TestAnimator;
string paramName;
void Start () {
TestAnimator = GetComponent<Animator>();
}
void Update () {
Test ();
}
void Test(){
if (Input.anyKeyDown) {
Debug.Log ("Testing...");
TestAnimator.Play ("animation1");
TestAnimator.PlayQueued ("animation2", QueueMode.CompleteOthers);
Debug.Log("Done!");
}
}
}