Create a gist now

Instantly share code, notes, and snippets.

Embed
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 ();
}
}
@tsubaki

This comment has been minimized.

Show comment
Hide comment
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