Extensions for all the types that implements IPlayableOutput.
Extension methods are static methods that can be called as if they were instance methods on the extended type.
using UnityEngine; using UnityEngine.Playables;
public class ExamplePlayableBehaviour : PlayableBehaviour { void Start() { PlayableGraph graph = PlayableGraph.Create(); ScriptPlayableOutput scriptOutput = ScriptPlayableOutput.Create(graph, "MyOutput");
// Calling method PlayableExtensions.SetWeight on ScriptPlayableOutput as if it was an instance method. scriptOutput.SetWeight(10);
// The line above is the same as calling directly PlayableExtensions.SetDuration, but it is more compact and readable. PlayableOutputExtensions.SetWeight(scriptOutput, 10); } }