Class BasicPlayableBehaviour
This class is deprecated. It is recommended to use Playable Asset and Playable Behaviour derived classes instead.
Inherited Members
Namespace: UnityEngine.Timeline
Assembly: Unity.Timeline.dll
Syntax
[Serializable]
[Obsolete("For best performance use PlayableAsset and PlayableBehaviour.")]
public class BasicPlayableBehaviour : ScriptableObject, IPlayableAsset, IPlayableBehaviour
Properties
duration
The playback duration in seconds of the instantiated Playable.
Declaration
public virtual double duration { get; }
Property Value
Type | Description |
---|---|
double |
outputs
A description of the outputs of the instantiated Playable.
Declaration
public virtual IEnumerable<PlayableBinding> outputs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<PlayableBinding> |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |