Playing queued animations and the current name and time for that...


i have build a test-scene where i created a simple sphere animation within the animation-editor in unity-pro. I created two animations on one component and i want to play them both queued. Then i want to know for each animationclip which is just playing and the normalizedTime of that clip. Ive tested something, but it doesnt works.. Any ideas on that? Thanks

public class AnimationTest : MonoBehaviour
    void Start () {
        animation.PlayQueued("sphere_1", QueueMode.CompleteOthers);
        animation.PlayQueued("sphere_2", QueueMode.CompleteOthers);
    void Update () {
       print("sphere: 1: " + animation["sphere_1"].normalizedTime);
       print("sphere: 2: " + animation["sphere_2"].normalizedTime);

Heres a screenshot from my animation-component: alt text

Update: Any ideas while playing queued animations there is no normalizedTime?

Check out Animation.PlayQueued documentation again - it returns new AnimationState, IIRC. So when you're doing this:

print("sphere: 1: " + animation["sphere_1"].normalizedTime);

you're actually printing normalizedTime of original animation (not the cloned one).