đī¸Precomposing
Use nested Timeflows for enhanced animation grouping
Last updated
Use nested Timeflows for enhanced animation grouping
Last updated
This feature requires 1.7.0 or later.
Precomposing provides a method to nest one Timeflow instance within another. This can be used to encapsulate animation groups with their own local time, markers, work area, display lists, and other settings.
Any Timeflow placed within the hierarchy of another Timeflow is considered a 'Precomp'. Precomps always have a parent Timeflow, which provides the global timing for the scene. This works in the same way as a regular TimeflowObject, with each object receiving its timing context from its parent.
Anytime Timeflow is inside the hierarchy of another Timeflow it is considered a 'precomp' and is controlled by the parent Timeflow. And conversely, any Timeflow which does not have a Timeflow parent in the hierarchy above it (parents or grand parents) then it is considered 'root' level and has independent timing of other Timeflows in the scene.
The primary advantage of precomposing is to have a separate timeline with its own separate display settings for a group of animations. This encloses a layer of time that can be edited and worked on in isolation from the rest of the scene. Precomps can also be made into prefabs to reuse in other scenes, either by itself or within another Timeflow parent.
Before using precompose, first get familiar with Time Offset and Local Time Scope to understand what can be done with regular objects and prefabs. These features provide similar sub-timeline editing without the overhead of a full Timeflow instance. In most cases, regular objects work just as well to group animations together.
Each Timeflow instance has a large footprint compared to a regular TimeflowObject since it has many more options and view settings, so it is recommended to only precompose where it provides necessary utility.
There is no limit on how many nested Timeflows there can be, however using many instances at once can affect performance and scene load times due to the additional data and setup required for each, so it is recommended to use judiciously.
In the Timeflow view, objects may be converted to and from precomps using the context menu commands Precompose and Decompose.
Right-click on any object in the view to show the context menu.
There are no keyboard shortcuts defined for Precompose or Decompose by default, but these commands may be mapped in the Unity Shortcuts Manager.
This option appears for regular objects that can be converted to a Timeflow instance. This replaces the TimeflowObject component with a new Timeflow component. Apply this to the parent object you wish to convert to a new Timeflow.
The new precomp will look and behave just like the object group, except now it has the Timeflow icon. Click the small > arrow to the right to open it, the same as when working with a prefab.
To exit and return to the parent Timeflow view, click the < arrow in the upper left of the Timeflow view.
The process of precomposing and decomposing attempts to maintain all object and track settings, however it is destructive by nature. The TimeflowObject must be destroyed first before the Timeflow component can be added to replace it.
This may require reassigning any custom script or component references to this object.
Conversion may also affect the displayed sorting order and any Display Lists which the object may have been saved to will need to be updated.
To convert a Timeflow instance back into a regular TimeflowObject, use the Decompose command. As with precomposing, this process maintains the object and track settings, but destroy all settings pertaining to the precomp Timeflow.
Undo is supported for both Precompose and Decompose, however note that undo may cause objects to be change in order or removed from the display. If this occurs the restored objects may simply be readded to the view.
Precomps can be edited in place in the parent Timeflow, just like with any group of objects. By default all of its channels and children are exposed for direct editing.
If you wish to hide the contents, hold Control and click on the foldout arrow. Or turn off the checkbox Show Children in the inspector.
You may also use the keyboard shortcut Control + Enter to open any selected prefab or precomp in the scene.
If the view appears empty initially, click the title bar where it says Select Display and select Everything, or another option of your choice.
You can also use the keyboard shortcut Control + Minus to exit the precomp.
To change the active view, you can also select from the drop down menu in the top left. This lists all Timeflow instances in the current scene.
Multiple Timeflows can also exist in parallel at the scene root level, in which case they are standalone and not precomps. This is primarily useful to establish separate animation layers that can play and stop independently of each other. For example, one layer could be used for ambient and environmental animations, while another layer used for gameplay and cutscenes.
Tracks for precomps work mostly the same as for regular objects, however the track start and end are tied to the Timeflow start and end time. Changes to the precomp track in the parent view will directly alter the duration of the precomp, as shown below.
If the parent track sections are split, then track shadows are cast into the precomp view as well.
Additional animation and behaviors may be added to the precomp parent object, however these channels are only visible in the parent view where the precomp object and track are displayed.
When the precomp is opened for editing, channels on the parent container are not displayed and not accessible from this view.
To open a precomp for editing, click the small arrow to the right of the name. This makes the precomp the active Timeflow view, which will then play in isolation of its parent.
Once you're done working on a precomp, you can return to the parent Timeflow view by click the small arrow in the upper left corner.
For more information, see
If you would like precomps to be opened immediately upon creation, enable the preference