Event
Trigger a function or event at a specific time during playback
Last updated
Trigger a function or event at a specific time during playback
Last updated
Events provide a way to invoke function calls during playback to implement custom behaviors. This is primarily used to initiate or end a state related to game play or other interactive applications.
Events only execute during playback
An event is only triggered when Timeflow is playing continuously. This does not require entering Play Mode in Unity, unless the function being invoked is a runtime-only feature.
Add an Event by right-clicking on the object in the Timeflow view and selecting: Add Automation > Events > Timeflow Event Alternatively:
Select a track section in the Track View and right-click to select Events.
Goto
Click the Goto button in the Info Panel or double-click on the event in the Track View to jump to the time of the event.
Select the game object to view Event settings in the Inspector. Events, like all other behaviors, are applied as components, with no limit on the number of events applied to each object.
Enter a name to help manage and identify events. This is for organizational purposes and is not required nor does it affect functionality.
Indicates when the event has been fired (checked) or not (unchecked). This gets reset upon start and when rewinding the timeline in edit mode.
Use this to invoke the event function immediately bypassing any restriction on limit. This is used only for testing events.
Sets the time the event is to be triggered during playback.
Assigns the event time using the current time of the playhead.
Events may be limited to perform only a certain number of times during each run. This value may be left at 0 for the event to be fired without limit.
Under normal circumstances, Timeflow plays through just once and the limit is not needed. However, when looping sections of time or rewinding to replay from the beginning, this may be needed to ensure certain actions aren't repeated.
Trigger Limit is enforced at runtime only When playing back Timeflow in edit mode, event triggers are reset each time rewinding the scene so that they fire each time played. This is much better for creative workflow while editing. However, during runtime (Play Mode) triggers are only initialized at start and never reset when rewinding or looping so that the Trigger Limit may be enforced.
Note that the named function is invoked for every component on the Target object that implements it. If no component with the function is found, then it fails silently.
Enter the exact name of the class method and leave blank or enter a parameter value to pass to the function when invoked. Below are examples showing how to implement methods in a component script.
Note that there is no automatic mechanism to reset or undo actions performed by events, unless you add them in some manner. As in the example above, the Spaceship object is deactivated by the event, so would require another event or other mechanism to reactivate it. Otherwise, it will remain inactive. Whenever creating events that make unidirectional changes, it is recommended to have an initialization process or add another event that resets objects to their default states at the appropriate times.
During playback, the precise time of an Event may not exactly align to the current time due to frame rates and timing intervals. To determine when an event is triggered, Timeflow checks whether the event time falls within the last update time and the current time (ignoring explicit jumps in time).
In most cases the discrepancy between the set trigger time and the actual time triggered is microseconds. However, in cases where frame rate has dropped or playback is skipping for other reasons, the actual event time triggered may be delayed.
Events have similar editing features to and are included with operations.
Click on an event in the to view its settings in the . Please see the editor section below for more options and further explanation of each setting.
Events do not allow to be customized, otherwise it may not perform as expected or events may not trigger at all.
Please refer to for common features.
Trigger Time is in local time which may be affected by .
Enable lock to prevent the event time from being changed. This also prevents dragging events in the .
Uses to invoke the named method and optional parameter. This works in edit mode if the target method does.
Use to trigger any object or property value.
To test whether an event is firing, enable in the Menu Bar and then play Timeflow uninterrupted over the event. The console log should output a message when the event is reached.
You may also press at any point to fire an event, regardless of any limits set.
The behavior is officially named TimeflowEvent so as to avoid ambiguity with other event types in Unity. Custom event implementations may also be created using TimeflowEvent as a base class. See TimeflowEvent.cs and for more information.