Class BasicPlayableBehaviour
This class is deprecated. It is recommended to use Playable Asset and Playable Behaviour derived classes instead.
Inherited Members
Namespace: UnityEngine.Timeline
Syntax
[Serializable]
[Obsolete("For best performance use PlayableAsset and PlayableBehaviour.")]
public class BasicPlayableBehaviour : ScriptableObject, IPlayableAsset, IPlayableBehaviour
Constructors
BasicPlayableBehaviour()
Declaration
public BasicPlayableBehaviour()
Properties
duration
The playback duration in seconds of the instantiated Playable.
Declaration
public virtual double duration { get; }
Property Value
Type | Description |
---|---|
Double |
Implements
outputs
A description of the outputs of the instantiated Playable.
Declaration
public virtual IEnumerable<PlayableBinding> outputs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<PlayableBinding> |
Implements
Methods
CreatePlayable(PlayableGraph, GameObject)
Implement this method to have your asset inject playables into the given graph.
Declaration
public virtual Playable CreatePlayable(PlayableGraph graph, GameObject owner)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The graph to inject playables into. |
GameObject | owner | The game object which initiated the build. |
Returns
Type | Description |
---|---|
Playable | The playable injected into the graph, or the root playable if multiple playables are injected. |
Implements
OnBehaviourPause(Playable, FrameData)
This function is called when the Playable play state is changed to Playables.PlayState.Paused.
Declaration
public virtual void OnBehaviourPause(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Implements
OnBehaviourPlay(Playable, FrameData)
This function is called when the Playable play state is changed to Playables.PlayState.Playing.
Declaration
public virtual void OnBehaviourPlay(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Implements
OnGraphStart(Playable)
This function is called when the PlayableGraph that owns this PlayableBehaviour starts.
Declaration
public virtual void OnGraphStart(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
Implements
OnGraphStop(Playable)
This function is called when the PlayableGraph that owns this PlayableBehaviour stops.
Declaration
public virtual void OnGraphStop(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
Implements
OnPlayableCreate(Playable)
This function is called when the Playable that owns the PlayableBehaviour is created.
Declaration
public virtual void OnPlayableCreate(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
Implements
OnPlayableDestroy(Playable)
This function is called when the Playable that owns the PlayableBehaviour is destroyed.
Declaration
public virtual void OnPlayableDestroy(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
Implements
PrepareFrame(Playable, FrameData)
This function is called during the PrepareFrame phase of the PlayableGraph.
Declaration
public virtual void PrepareFrame(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Implements
ProcessFrame(Playable, FrameData, Object)
This function is called during the ProcessFrame phase of the PlayableGraph.
Declaration
public virtual void ProcessFrame(Playable playable, FrameData info, object playerData)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The Playable that owns the current PlayableBehaviour. |
FrameData | info | A FrameData structure that contains information about the current frame context. |
Object | playerData | The user data of the ScriptPlayableOutput that initiated the process pass. |