đŊī¸Unity Timeline
Synchronize Timeflow with Unity Timeline
Last updated
Synchronize Timeflow with Unity Timeline
Last updated
Timeflow does not require Unity Timeline to work, however some users may wish to use both.
To use this feature, please locate and import the Timeline package in the Samples section of Timeflow in the Package Manager.
While either or both may be used without the Timeline samples package, it is required if you want to synchronize the two together.
When synced, the time in both Timeflow and Timeline are unified. Playing or moving the time in one affects the other. The integration package also includes an example scene to help you get started.
Open the Timeline window from the main menu: Window/Sequencing/Timeline
It may be helpful initially to dock the windows stacked as shown above, though is not required if you prefer a different layout.
Open the scene you wish to work with. If Timeflow has not already been set up, click 'Add Timeflow to this scene'. Also click the 'Create' button in the Timeline window and create new playable asset.
After each has been set up, the Timeline and Timeflow view will appear empty as below.
Drag and drop the Timeflow game object into the Timeline window. Upon doing so, a context menu will appear as shown below. Select "Add Timeflow Control Track".
This adds an empty track for Timeflow.
Click on the 3 stacked dots to the right of the track and from the menu select "Add Timeflow Control Clip".
This adds a clip to the track channel which corresponds to the Timeflow duration.
Please note that multiple control clips may be created, however Timeflow does not support blending clip blending, so they are either on or off controlling the playback of Timeflow. See the documentation below for more about working with multiple clips.
When the above setup has been completed, Timeflow will automatically be connected to the director as shown in the Settings section of the Timeflow inspector.
Once Timeflow has been synced with Timeline, moving time or playing in either view affects the other, however note that ultimately Timeline controls the master time when syncing.
Click the director icon displayed in the toolbar (to the left of the playback controls) to toggle director syncing on or off. When enabled, the current Timeflow instance is synced with the Timeline director assigned. While editing it may sometimes be helpful to turn off syncing to freely work with the current Timeflow animations independently of the director.
This icon button only appears when a Timeline director has been assigned in the Timeflow inspector, under Settings. If none has been assigned, then this icon is hidden.
Multiple Timeflow instances may also be added to Timeline following the same setup procedure above. The control clips for each may be adjusted to set the start and end times.
The starting point of the clip for each starts at time 0 in the corresponding Timeflow view.
Please note that using multiple Timeflow instances is an advanced setup and isn't usually required. Only add multiple instances if separate timing layers are needed.
By default, new clips match the duration of each Timeflow instance. However, you may adjust the clip start and end points to sequence portions of the Timeflow animation in Timeline.
Note that Timeflow stops updating when it reaches the end of a track, until the next section is reached. Having gaps in clip ranges affects the behavior of the Timeflow view and will cause gaps in the playback.
For additional settings, select a Timeflow control clip to view it in the inspector.
This option defaults on and means that each clip starts at the corresponding time in Timeflow. So if the clip starts at 5 seconds, then it plays back in Timeflow starting at 5 seconds. Or you may disable this checkbox to manually set a start time, regardless of the clip's start time in Timeline.
This sets a specific start time for the clip to begin playback in Timeflow. Use this to queue the clip to a specific starting point in Timeflow, such as the time of a marker or event.
At any point you wish to, you may reset a Timeflow control clip back to the full duration of the Timeflow by right-clicking on the clip to show the context menu and selecting Match Content, or using the keyboard shortcut C.
Whenever Timeflow is synced with a Timeline director, whichever initiates playback (calling Play()) is in control of time. Typically you'll want to initiate playback in the director, especially if multiple clips or Timeflow instances are synced with the same director. However, you may also start playback from Timeflow in which case it controls the timing of the Timeline director. This behavior automatically detects which timeline system is controlling playback so that it will work as expected in each situation.
Whenever Timeline is in control of playback, music synchronization in Timeflow cannot be enforced. This is because music synchronization in Timeflow is driven by the audio time and having 2 simultaneous systems fighting to control the master time results in skipping and interrupted playback.
If music synchronization is essential for your setup, initiate playback in Timeflow so that it controls the Timeline director, rather than the other way around. Alternatively, you could disable Timeline director sync and initiate Timeflow playback with an event, instead of using a control clip in the director.