Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PlayableOutputExtensions

Extensions for all the types that implements IPlayableOutput.
Read time 1 minuteLast updated 10 days ago

Definition

public static class PlayableOutputExtensions

Remarks

Extension methods are static methods that can be called as if they were instance methods on the extended type.

Examples

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); }}

Static Methods

Method

Description

AddNotificationReceiverRegisters a new receiver that listens for notifications.
GetNotificationReceiversRetrieves the list of notification receivers currently registered on the output.
GetSourceOutputPortReturns the source playable's output connection index.
GetSourcePlayableReturns the source playable.
GetUserDataReturns the opaque user data. This is the same value as the last last argument of ProcessFrame.
GetWeightReturns the weight of the connection from the PlayableOutput to the source playable.
IsOutputNullReturns true if the PlayableOutput is null, false otherwise.
PushNotificationQueues a notification to be sent through the Playable system.
RemoveNotificationReceiverUnregisters a receiver on the output.
SetReferenceObjectSets the bound object to a new value. Used to associate an output to an object (Track asset in case of Timeline).
SetSourcePlayableSets which playable that computes the output.
SetUserDataSets the opaque user data. This same data is passed as the last argument to ProcessFrame.
SetWeightSets the weight of the connection from the PlayableOutput to the source playable.