graph | The Animation window PlayableGraph. |
inputPlayable | Current root of the PlayableGraph. |
Playable Returns the new root of the PlayableGraph.
Appends custom Playable nodes to the Animation window PlayableGraph.
The Animation window calls this function when it samples an AnimationClip. This does not support legacy Animation clips.
using UnityEngine; using UnityEngine.Experimental.Animations; using UnityEngine.Playables;
public class ExampleScript : MonoBehaviour, IAnimationWindowPostProcess { struct AnimationJob : IAnimationJob { public void ProcessRootMotion(AnimationStream stream) { // Dummy method. }
public void ProcessAnimation(AnimationStream stream) { // Dummy method. } }
public Playable PostProcessPlayableGraph(PlayableGraph graph, Playable input) { var job = new AnimationJob(); var playable = AnimationScriptPlayable.Create(graph, job, 1);
graph.Connect(input, 0, playable, 0);
return playable; } }
Did you find this page useful? Please give it a rating: