Skip to main content

PlayableDirector

info

PlayableDirector inherits from Behaviour

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

Members

Properties

NameDescription
PlayableDirector.durationThe duration of the Playable in seconds.
PlayableDirector.extrapolationModeControls how the time is incremented when it goes beyond the duration of the playable.
PlayableDirector.initialTimeThe time at which the Playable should start when first played.
PlayableDirector.pausedEvent that is raised when a PlayableDirector component has paused.
PlayableDirector.playedEvent that is raised when a PlayableDirector component has begun playing.
PlayableDirector.playOnAwakeWhether the playable asset will start playing back as soon as the component awakes.
PlayableDirector.stateThe current playing state of the component. (Read Only)
PlayableDirector.stoppedEvent that is raised when a PlayableDirector component has stopped.
PlayableDirector.timeThe 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.timeUpdateModeControls how time is incremented when playing back.

Methods

NameDescription
PlayableDirector.ClearGenericBinding(key)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)Clears an exposed reference value.
PlayableDirector.Evaluate()Evaluates the currently playing Playable at the current time.
PlayableDirector.GetGenericBinding(key)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)Retreives an ExposedReference binding.
PlayableDirector.Pause()Pauses playback of the currently running playable.
PlayableDirector.Play(asset, mode)Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.Play(asset)Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.Play()Instatiates a Playable using the provided PlayableAsset and starts playback.
PlayableDirector.RebindPlayableGraphOutputs()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()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()Resume playing a paused playable.
PlayableDirector.SetGenericBinding(key, value)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)Sets an ExposedReference value.
PlayableDirector.Stop()Stops playback of the current Playable and destroys the corresponding graph.

Inherited Members

Inherited Properties

NameDescription
PlayableDirector.enabledEnabled Behaviours are Updated, disabled Behaviours are not.
PlayableDirector.isActiveAndEnabledHas the Behaviour had active and enabled called?
PlayableDirector.gameObjectThe game object this component is attached to. A component is always attached to a game object.
PlayableDirector.tagThe tag of this game object.
PlayableDirector.transformThe Transform attached to this GameObject.
PlayableDirector.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
PlayableDirector.nameThe name of the object.

Inherited Methods

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