Version: 2019.1 (switch to 2018.3 or 2017.4)
LanguageEnglish
  • C#
Experimental: this API is experimental and might be changed or removed in the future.

IAnimationWindowPostProcess.PostProcessPlayableGraph

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

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: