Class TimeNotificationBehaviour
Use this PlayableBehaviour to send notifications at a given time.
Inherited Members
Namespace: UnityEngine.Timeline
Syntax
public class TimeNotificationBehaviour : PlayableBehaviour, IPlayableBehaviour, ICloneable
Properties
timeSource
Sets an optional Playable that provides duration and Wrap mode information.
Declaration
public Playable timeSource { set; }
Property Value
Type | Description |
---|---|
Playable |
Remarks
timeSource is optional. By default, the duration and Wrap mode will come from the current Playable.
Methods
AddNotification(Double, INotification, NotificationFlags)
Adds a notification to be sent with flags, at a specific time.
Declaration
public void AddNotification(double time, INotification payload, NotificationFlags flags = NotificationFlags.Retroactive)
Parameters
Type | Name | Description |
---|---|---|
Double | time | The time to send the notification. |
INotification | payload | The notification. |
NotificationFlags | flags | The notification flags that determine the notification behaviour. This parameter is set to Retroactive by default. |
See Also
Create(PlayableGraph, Double, DirectorWrapMode)
Creates and initializes a ScriptPlayable with a TimeNotificationBehaviour.
Declaration
public static ScriptPlayable<TimeNotificationBehaviour> Create(PlayableGraph graph, double duration, DirectorWrapMode loopMode)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The playable graph. |
Double | duration | The duration of the playable. |
DirectorWrapMode | loopMode | The loop mode of the playable. |
Returns
Type | Description |
---|---|
ScriptPlayable<TimeNotificationBehaviour> | A new TimeNotificationBehaviour linked to the PlayableGraph. |
OnBehaviourPause(Playable, FrameData)
This method 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 reference to the playable associated with this PlayableBehaviour. |
FrameData | info | Playable context information such as weight, evaluationType, and so on. |
Overrides
OnGraphStart(Playable)
This method is called when the PlayableGraph that owns this PlayableBehaviour starts.
Declaration
public override void OnGraphStart(Playable playable)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The reference to the playable associated with this PlayableBehaviour. |
Overrides
PrepareFrame(Playable, FrameData)
This method is called during the PrepareFrame phase of the PlayableGraph.
Declaration
public override void PrepareFrame(Playable playable, FrameData info)
Parameters
Type | Name | Description |
---|---|---|
Playable | playable | The reference to the playable associated with this PlayableBehaviour. |
FrameData | info | Playable context information such as weight, evaluationType, and so on. |
Overrides
Remarks
Called once before processing starts.