Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Outputを複数持ったPlayableGraph
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;
public class ACon : MonoBehaviour
{
PlayableGraph graph;
[SerializeField] Animator[] animators;
[SerializeField] AnimationClip clip;
void Awake()
{
graph = PlayableGraph.Create ();
}
void Start()
{
var clipPlayable = AnimationClipPlayable.Create (graph, clip);
foreach (var anim in animators) {
var output = AnimationPlayableOutput.Create (graph, anim.name, anim);
output.SetSourcePlayable (clipPlayable);
}
graph.Play ();
}
void OnDestroy()
{
graph.Destroy ();
}
}
Owner

tsubaki commented Jul 30, 2017

animation 103
12 41 31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment