đPrefabs
Tips and best practices for using prefabs with Timeflow
Use Unity's built-in prefab system to create reusable assets, including Timeflow behaviors and animations! Just as with any prefab, overrides may be used to customize prefab instances.
If you're new to working with prefabs, please refer to the Unity documentation.
Creating Prefabs
To create a prefab, simply select a game object in the Hierarchy view, and drag and drop it into your Project view, which you may place into any directory for organization.

The item turns blue indicating it is now a prefab object.
If the object is a prefab instance, saving it applies all overrides made in the scene to the prefab. This is the same as selecting Apply All from the Overrides menu.
Prefabs in Timeflow
In the Timeflow view, prefab instances are shown with a blue label color, matching how they are displayed in the built-in Hierarchy view.

Open in Prefab Mode
The prefab instance may be edited directly in the Timeflow view, which will create overrides for any changes. Or if you wish to edit the prefab directly, click the small arrow icon to the right of the object name to open the prefab asset. This same behavior is also used with Precomposing

You may also use the keyboard shortcut Control + Enter to open any selected prefab or precomp in the scene.
Prefabs are automatically displayed using Local Time Scope.
To open a prefab for editing in the Timeflow view, you must either have a scene open with an active Timeflow instance, or the prefab must be a precomp containing a Timeflow instance.
Exit Prefab Mode
Once you are finished editing a prefab, you may close and save the prefab using any of the built-in methods, or in the Timeflow view click the arrow button in the upper left corner. The view will then return to the current scene, first prompting to save any changes.
You may also use the keyboard shortcut Control + Minus to exit prefab mode, which will prompt you to save any unsaved changes.
Prefab Tips

Known Issues
Setting the parent of a transform which resides in a Prefab instance is not possible
If any component inside a prefab performs reparenting as part of its animation or behavior, this will result in the warning above.
Solution: The prefab must be unpacked, or an alternate approach is needed that does not require reparenting. For virtual parenting without affecting the hierarchy, see Follow
To unpack a prefab, right-click on it in the hierarchy view and select from the context menu Prefab/Unpack. If the prefab is comprised of other prefabs, the entire hierarchy can be unpacked using Unpack Completely.

Last updated