I tried to change animation clips through AnimationClipPlayable.
But first animation only plays correctly.
Second animation broke.
This is reproduce code.
Is is a bug or my usage is wrong?
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Experimental.Director;
public class PlayableTest : MonoBehaviour {
// reference
public Animator characterAnimator;
public List<AnimationClip> clips;
private int index = -1;
public void OnClickNext(){
Debug.Log ("clicked");
index += 1;
var clip = clips [index];
var clipPlayable = new AnimationClipPlayable(clip);
clipPlayable.time = 0.0f;
characterAnimator.Play (clipPlayable);
}
}