예제 #1
0
    void Start()
    {
        PlayQueuePlayable play_queue = new PlayQueuePlayable();
        play_queue.SetInputs( clips_to_play );

        // Bind the queue to the player
        GetComponent<Animator>().Play( play_queue );
    }
        private void Start()
        {
            playableGraph = PlayableGraph.Create();

            var playQueuePlayable = ScriptPlayable <PlayQueuePlayable> .Create(playableGraph);

            playQueue = playQueuePlayable.GetBehaviour();
            playQueue.Initialize(clips, playQueuePlayable, playableGraph, OnNewClip);

            var playableOutput = AnimationPlayableOutput.Create(playableGraph, "Animation", GetComponent <Animator>());

            playableOutput.SetSourcePlayable(playQueuePlayable);
            playableOutput.SetSourceOutputPort(0);

            playableGraph.Play();
        }