Class ActivationControlPlayable
Playable that controls the active state of a GameObject.
Inheritance
Namespace: UnityEngine.Timeline
Syntax
public class ActivationControlPlayable : PlayableBehaviour
Fields
gameObject
Declaration
public GameObject gameObject
Field Value
Type | Description |
---|---|
GameObject |
postPlayback
Declaration
public ActivationControlPlayable.PostPlaybackState postPlayback
Field Value
Type | Description |
---|---|
ActivationControlPlayable.PostPlaybackState |
Methods
Create(PlayableGraph, GameObject, ActivationControlPlayable.PostPlaybackState)
Creates a ScriptPlayable with an ActivationControlPlayable behaviour attached
Declaration
public static ScriptPlayable<ActivationControlPlayable> Create(PlayableGraph graph, GameObject gameObject, ActivationControlPlayable.PostPlaybackState postPlaybackState)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | PlayableGraph that will own the playable |
GameObject | gameObject | The GameObject that triggered the graph build |
ActivationControlPlayable.PostPlaybackState | postPlaybackState | The state to leave the gameObject after the graph is stopped |
Returns
Type | Description |
---|---|
ScriptPlayable<ActivationControlPlayable> | Returns a playable that controls activation of a game object |
OnBehaviourPause(Playable, FrameData)
This function is called when the Playable play state is changed to PlayState.Paused.
Declaration
public override void OnBehaviourPause(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
FrameData | info | The information about this frame |
OnBehaviourPlay(Playable, FrameData)
This function is called when the Playable play state is changed to Playables.PlayState.Playing.
Declaration
public override void OnBehaviourPlay(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
FrameData | info | The information about this frame |
OnGraphStart(Playable)
This function is called when the PlayableGraph that owns this PlayableBehaviour starts.
Declaration
public override void OnGraphStart(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
OnPlayableDestroy(Playable)
This function is called when the Playable that owns the PlayableBehaviour is destroyed.
Declaration
public override void OnPlayableDestroy(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
ProcessFrame(Playable, FrameData, Object)
This function is called during the ProcessFrame phase of the PlayableGraph.
Declaration
public override void ProcessFrame(Playable playable, FrameData info, object userData)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The playable this behaviour is attached to. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
System.Object | userData | unused |