Experimental: this API is experimental and might be changed or removed in the future.

IAnimationWindowPostProcess.PostProcessPlayableGraph

public Playables.Playable PostProcessPlayableGraph(Playables.PlayableGraph graph, Playables.Playable inputPlayable);

Parameters

graphThe Animation window PlayableGraph.
inputPlayableCurrent root of the PlayableGraph.

Returns

Playable Returns the new root of the PlayableGraph.

Description

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: