Created
June 15, 2016 14:37
-
-
Save tsubaki/f29033d809b80131250f9ec7d88a2ea0 to your computer and use it in GitHub Desktop.
AnimationClipPlayableのAPI(5.4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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