Extensions for all the types that implements IPlayable.
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(); AnimationMixerPlayable mixer = AnimationMixerPlayable.Create(graph, 1);
// Calling method PlayableExtensions.SetDuration on AnimationMixerPlayable as if it was an instance method. mixer.SetDuration(10);
// The line above is the same as calling directly PlayableExtensions.SetDuration, but it is more compact and readable. PlayableExtensions.SetDuration(mixer, 10); } }
AddInput | Add a new input port and connect the output port of a Playable to this new port. |
ConnectInput | Connect the output port of a Playable to one of the input ports. |
Destroy | Destroys the current Playable. |
GetDuration | Returns the duration of the Playable. |
GetGraph | Returns the PlayableGraph that owns this Playable. A Playable can only be used in the graph that was used to create it. |
GetInput | Returns the Playable connected at the given input port index. |
GetInputCount | Returns the number of inputs supported by the Playable. |
GetInputWeight | Returns the weight of the Playable connected at the given input port index. |
GetOutput | Returns the Playable connected at the given output port index. |
GetOutputCount | Returns the number of outputs supported by the Playable. |
GetPlayState | Returns the current PlayState of the Playable. |
GetPropagateSetTime | Returns the time propagation behavior of this Playable. |
GetSpeed | Returns the speed multiplier that is applied to the the current Playable. |
GetTime | Returns the current local time of the Playable. |
IsDone | Returns a flag indicating that a playable has completed its operation. |
IsValid | Returns the vality of the current Playable. |
SetDone | Changes a flag indicating that a playable has completed its operation. |
SetDuration | Changes the duration of the Playable. |
SetInputCount | Changes the number of inputs supported by the Playable. |
SetInputWeight | Changes the weight of the Playable connected to the current Playable. |
SetOutputCount | Changes the number of outputs supported by the Playable. |
SetPropagateSetTime | Changes the time propagation behavior of this Playable. |
SetSpeed | Changes the speed multiplier that is applied to the the current Playable. |
SetTime | Changes the current local time of the Playable. |