Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created June 15, 2016 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/f29033d809b80131250f9ec7d88a2ea0 to your computer and use it in GitHub Desktop.
Save tsubaki/f29033d809b80131250f9ec7d88a2ea0 to your computer and use it in GitHub Desktop.
AnimationClipPlayableのAPI(5.4)
using UnityEngine;
public class SamplePlayableAPI : MonoBehaviour {
// 対象のAniamtor
[SerializeField] Animator animator;
// 再生するAnimationClip
[SerializeField] AnimationClip clip;
void Start ()
{
// PlayableAPIのノードを作ってAnimatorで再生
var playableClip = UnityEngine.Experimental.Director.AnimationClipPlayable.Create(clip);
animator.Play(playableClip);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment