Skip to content

API > PlayableDirector


PlayableDirector⚓︎

PlayableDirector inherits from Behaviour

Instantiates a PlayableAsset and controls playback of Playable objects.
Check Unity PlayableDirector

Members⚓︎

Properties⚓︎

Name Description
PlayableDirector.durationProperty The duration of the Playable in seconds.
PlayableDirector.extrapolationModeProperty Controls how the time is incremented when it goes beyond the duration of the playable.
PlayableDirector.initialTimeProperty The time at which the Playable should start when first played.
PlayableDirector.pausedPropertyReadonly Property Event that is raised when a PlayableDirector component has paused.
PlayableDirector.playedPropertyReadonly Property Event that is raised when a PlayableDirector component has begun playing.
PlayableDirector.playOnAwakeProperty Whether the playable asset will start playing back as soon as the component awakes.
PlayableDirector.stateProperty The current playing state of the component. (Read Only)
PlayableDirector.stoppedPropertyReadonly Property Event that is raised when a PlayableDirector component has stopped.
PlayableDirector.timeProperty The component's current time. This value is incremented according to the PlayableDirector.timeUpdateMode when it is playing. You can also change this value manually.
PlayableDirector.timeUpdateModeProperty Controls how time is incremented when playing back.

Methods⚓︎

Name Description
PlayableDirector.ClearGenericBinding(key) Method Clears the binding of a reference object. Use this method to clear the binding and remove the dependency to the source object. For example, use this method to clear the binding for a Timeline track that is no longer used.
PlayableDirector.ClearReferenceValue(id) Method Clears an exposed reference value.
PlayableDirector.Evaluate() Method Evaluates the currently playing Playable at the current time.
PlayableDirector.GetGenericBinding(key) Method Returns a binding to a reference object. In Timeline this is the track to bind an object to. This typically corresponds to the PlayableBinding.sourceObject in the PlayableAsset.
PlayableDirector.GetReferenceValue(id) Method Retreives an ExposedReference binding.
PlayableDirector.Pause() Method Pauses playback of the currently running playable.
PlayableDirector.Play(asset, mode) Method Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.Play(asset) Method Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.Play() Method Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.RebindPlayableGraphOutputs() Method Rebinds each PlayableOutput of the PlayableGraph. This function updates the PlayableOutputs binding information. It should be used if a component has been added or deleted. New Animator, AudioSource and NotificationReceiver objects can be discovered this way without rebuilding the graph.
PlayableDirector.RebuildGraph() Method Discards the existing PlayableGraph and creates a new instance. When the PlayableDirector starts playback, it creates a PlayableGraph from the assigned PlayableAsset. Use this method when the assigned PlayableAsset has changed and it is necessary to show the changes during playback. RebuildGraph attempts to maintain the current playback state. For example, if the PlayableDirector has not started playback, RebuildGraph constructs a new PlayableGraph and does not start playback. If the PlayableDirector is playing an existing graph, RebuildGraph stops playback, destroys the graph, creates a new instance of the graph, and resumes playback.
PlayableDirector.Resume() Method Resume playing a paused playable.
PlayableDirector.SetGenericBinding(key, value) Method Sets the binding of a reference object from a PlayableBinding.Use this method to associate assets to objects loaded in the scene. For example, use SetGenericBinding to bind a Timeline track to a GameObject or Component.If the value is set to null, the source object is bound to null and the dependency between the PlayableDirector and the source object is kept.
PlayableDirector.SetReferenceValue(id, value) Method Sets an ExposedReference value.
PlayableDirector.Stop() Method Stops playback of the current Playable and destroys the corresponding graph.

Inherited Members⚓︎

Inherited Properties⚓︎

Name Description
PlayableDirector.enabledProperty Enabled Behaviours are Updated, disabled Behaviours are not.
PlayableDirector.isActiveAndEnabledProperty Has the Behaviour had active and enabled called?
PlayableDirector.gameObjectPropertyReadonly Property The game object this component is attached to. A component is always attached to a game object.
PlayableDirector.tagPropertyReadonly Property The tag of this game object.
PlayableDirector.transformPropertyReadonly Property The Transform attached to this GameObject.
PlayableDirector.hideFlagsProperty Should the object be hidden, saved with the Scene or modifiable by the user?
PlayableDirector.nameProperty The name of the object.

Inherited Methods⚓︎

Name Description
PlayableDirector.BroadcastMessage(methodName, parameter=nil)Method Calls the method named methodName on every Lua Script in this game object or any of its children.
PlayableDirector.CompareTag(tag)Method Is this game object tagged with tag ?
PlayableDirector.GetAllLuaScripts()Method Returns an array of all Lua scripts that attached to the game object.
PlayableDirector.GetComponent(type)Method Returns the component of Type type if the game object has one attached, nil if it doesn't.
PlayableDirector.GetComponentInChildren(t)Method Returns the component of Type type in the GameObject or any of its children using depth first search.
PlayableDirector.GetComponentInParent(t)Method Returns the component of Type type in the GameObject or any of its parents.
PlayableDirector.GetComponents(type)Method Returns all components of Type type in the GameObject.
PlayableDirector.GetComponentsInChildren(t)Method Returns all components of Type type in the GameObject or any of its children.
PlayableDirector.GetComponentsInParent(t)Method Returns all components of Type type in the GameObject or any of its parents.
PlayableDirector.SendMessage(methodName, value=nil)Method Calls the method named methodName on every Lua Script in this game object.
PlayableDirector.SendMessageUpwards(methodName, value=nil)Method Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
PlayableDirector.TryGetComponent(type)Method Gets the component of the specified type, if it exists.
PlayableDirector.GetInstanceID()Method Returns the instance id of the object.