Timeflow Controller
A script to control Timeflow playback at runtime
Last updated
A script to control Timeflow playback at runtime
Last updated
This component may be used to start and stop playback, queue specific markers, or play custom regions in time. Use the Timeflow Controller for cutscenes or to play animations interactively.
To add a new Timeflow Controller, first select the Timeflow instance in the scene that you wish to control, and then select from the main menu:
Tools/Timeflow/Add/Timeflow Controller
Designates the Timeflow instance being controlled. Any other Timeflow instances in the scene will not be affected by this controller, unless they are children of the target Timeflow.
This sets the default play mode when the Play() method is called.
This specifies the duration in seconds to lead out of the current work area region when Skip() is invoked. If for example the current work area ends at 10 seconds and the skip duration is set to 2, invoking Skip() will fast forward to 8 seconds and play through to the end at 10.
Queues Timeflow to play on scene start at the designated marker by index value. Each marker in Timeflow has a unique index (integer value). Typically, 1 is the first index in the scene unless it has been changed.
Sets the play mode initially upon scene start.
Determines how playback behaves, with one of the following settings.
Timeflow does not play and remains paused. Use this mode to stop Timeflow completely.
Plays through the designated time region once. When it reaches the end of the current area, playback stops.
Plays the current work area (or full timeline) repeating indefinitely.
This mode continues to play even when the end of the work area is reached. However, playback will stop when it reaches the end of the timeline.
This event is called once when the Timeflow Controller initially starts. This event is invoked during Start(), after the above startup play mode has been executed.
This event is invoked each time any Play method is called on the Timeflow Controller.
This event is invoked once playback stops or reaches the end of the current time section.
This event is invoke when Skip() is called, either by script or by an event.
The following methods are defined in the Timeflow Controller script and may be called wither by script or events.
Explicitly set the start time of the playback region.
Sets the end time of the current playback region.
Sets the start and end time of the current playback region in one call.
Queue playback starting from the marker with the given index, automatically setting the time region up to the following marker.
Queues playback of a marker region with a specific name, automatically setting the time range up to the next marker after it.
Be careful to enter marker names precisely. They are case sensitive. If no marker is found matching the specified name, nothing will happen.
Queues playback using a marker reference. This is called internally or by other scripts with a TimeflowMarker object.
Starts playback from a specific time in seconds.
Starts playback from the beginning of the current work area, or the start of the timeline if the work area is off.
Resumes playing from the current time.
Advances time to the end of the current work area. If the Skip Duration is set, the time is advanced to that duration before the end, to allow lead out time.
Stops playback. This is also the same as pausing Timeflow. If Play() is called afterward, it resumes from the current tiem.
This determines whether the is used in Timeflow to constrain playback to a specific region in time. In most cases, the Work Area is desired to set the start and end time for the current marker being played, though it may be turned off to continue to play the timeline until the end, or until interrupted by another event.
Note that index values may change if the command is used in the Timeflow Markers inspector.
The following events can be configured in the editor to perform additional actions. These can be used to setup game logic in the editor without additional scripting. For more information, see the .
Sets the current play mode to .
Sets the current play mode to .
Sets the current play mdoe to .