🏭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.

Use the keyboard shortcut Control + Alt + Shift + S to 'Save Selected Prefabs'.

If the selected object(s) is not a prefab instance, a new prefab is created in the Prefab Save Path designated in the preferences.

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

Prefabs are automatically displayed using Local Time Scope.

When a prefab is open for editing, a blue line is drawn across the toolbar as a visual queue to indicate that prefab mode is active.

Precomps can also be made into prefabs, though precomposing is not required and prefabs can be made from any group of objects.

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.

Prefab Tips

Disable Auto Save

To improve performance while working with prefabs it is highly recommended to disable the Auto Save setting in prefab mode. This option can be found in the Scene view while a prefab is open for editing.

Auto Save is enabled, it can slow down editor performance while adjusting animations

Place in time using Drag Time Offset

If you have an animated object or hierarchy of objects in a prefab that you wish to sequence instances of in Timeflow, it is best to use Time Offset. This allows you to place the object track anywhere in time without changing the timing of animation keyframes within it. For the best user experience, enabling Drag Time Offset is recommended.

Drag prefabs directly into Timeflow

You can drag prefab objects directly from the Project view into the Timeflow view. Just as when drag-dropping a prefab into the Hierarchy view, a new prefab instance is created in the scene.

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.

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