Experimental: this API is experimental and might be changed or removed in the future.
PlayableHandle
struct in
UnityEngine.Experimental.Director
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
Some Playables are implemented as internal C++ objects but are exposed as C# structs. Using PlayableHandle allows for the possibility of creating Playable graphs without allocating memory in your C# scripts that might later require garbage collection. One downside of using structs as opposed to classes is that structs in C# do not support inheritance.
The GetObject method allows you to convert a Playable into its C# class type.
Static Variables
Null | Used to compare PlayableHandles. |
Variables
duration | The duration of the Playable in seconds. |
graph | The PlayableGraph that created the playable. |
inputCount | Gets and Sets the number of inputs for the Playable. |
isDone | A flag indicating that a playable has completed its operation. |
outputCount | Gets and Sets the number of outputs for the Playable. |
playState | When playing, the time will advance in the Playable during evaluation of the graph. |
speed | Modulates how time is incremented when the Playable is playing. |
time | The current time of the Playable. |
Public Functions
Destroy | Destroys the Playable associated with this PlayableHandle. |
GetInput | Returns the PlayableHandle connected at the given input port index. |
GetInputWeight | Returns the weight of the Playable connected at the given input port index. |
GetObject | Returns a Playable representation of the handle. |
GetOutput | Returns the PlayableHandle connected at the given ouput port index. |
IsValid | Returns true if the Playable is properly constructed by the PlayableGraph and has not been destroyed. |
SetInputWeight | Sets the weight of the Playable connected at the given input port index. |