Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Experimental: this API is experimental and might be changed or removed in the future.

PlayableGraph

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

Cancel

Description

The PlayableGraph is used to manage PlayableHandle creation, destruction and connections.

It is also used to create the PlayableOutput which connects the PlayableGraph to different systems.

Variables

isDoneIndicates that a graph has completed its operations.
playableCountReturns the number of PlayableHandle owned by the Graph.
rootPlayableCountReturns the number of PlayableHandle owned by the Graph that have no connected outputs.
scriptOutputCountGets the number of ScriptPlayableOutput in the PlayableGraph.

Public Functions

ConnectConnects two Playable instances, either by referencing the Playable instances themselves or by their PlayableHandles.
CreateGenericMixerPlayableCreates a generic ScriptPlayable mixer.
CreatePlayableThis method allows you to create custom Playable instances.
CreateScriptOutputCreates a ScriptPlayableOutput in the [PlayableGraph]].
CreateScriptPlayableCreates a ScriptPlayable in the PlayableGraph.
DestroyDestroys the graph.
DestroyOutputDestroys the PlayableOutput.
DestroyPlayableDestroys the Playable associated with this PlayableHandle.
DestroySubgraphRecursively destroys the given Playable and all children connected to its inputs.
DisconnectDisconnects PlayableHandle. The connections determine the topology of the PlayableGraph and how its is evaluated.
EvaluateEvaluates all the PlayableOutputs in the graph, and updates all the connected Playables in the graph.
GetRootPlayableReturns the PlayableHandle with no output connections at the given index.
GetScriptOutputReturns the ScriptPlayableOutput at the given index.
IsValidReturns true if the PlayableGraph has been properly constructed using PlayableGraph.CreateGraph and is not deleted.
PlayPlays the graph.
StopStops the graph, if it is playing.

Static Functions

CreateGraphCreates a PlayableGraph.