Im developing an AR application in Unity 4.6 using a public static int “nextNum” to que various text objects and animation clips. The animation clips were made using Unity’s built animation function, rather than imported from elsewhere, so should have no problem with being legacy etc. The public static int nextNum works fine and have it working with text, however I cannot que animations clips using a similar script.
The script below is attached to the model object, on which there is a number of animation clips. The animation clip CubeRise has been dragged/dropped into the inspector.
using UnityEngine;
using System.Collections;
public class CubeRiseControl : MonoBehaviour
{
public AnimationClip CubeRise;
void PlayCubeRise ()
{
if (SetButInc.nextNum == 2)
{
animation.Play("CubeRise");
}
}
}