✍️Creating Presets

How to create custom presets

Although Timeflow ships with a collection of Standard presets to get you started, you will gain the most benefit from the preset system by using it to store and organize your own project assets.

Although modifying the Standard presets is allowed, it is recommended that you create your own collection separate from the sample assets.

Creating a Collection

There are several ways to create a new preset collection.

  1. In the Project view, create or select a folder to contain the new preset collection, and then right click to select from the context menu: Create -> Timeflow -> Advanced Preset Collection

  1. Or in the Advanced Presets Window, exit solo mode by clicking the white circle in the upper left. And then make sure that edit mode (pencil icon) is enabled.

    The buttons to create a New Folder and New Collection are only visible while in edit mode.

Then press the button "+ New Collection" to select a location and file name. The asset must be saved somewhere within the Assets directory.

Inspector

With the new collection asset created, you may select and edit it directly in the inspector. This is the same as working in the Advanced Presets Window and you may user either one.

A new collection by default contains one folder and one group assigned a random color as a starting point. You may now begin to customize it as you wish, such as giving the folder an group a name, color, and icon.

The collection color and name are revealed by clicking the gear icon in the top menu bar.

Once you are done configuring, the gear icon can be toggled to close the settings. We can now start adding presets.

Creating Presets

Any object, prefab, or folder (containing prefabs) can be dragged into the area denoted in the window.

To show an example of creating a preset from a game object in the scene, we can add a new cube as a test. From the main menu: GameObject/3D Object/Cube.

Drag and drop the game object either from the Hierarchy, or from the Timeflow view.

Before saving the preset, you will be prompted by the following dialog. The default option is to Create and Link, which will create the new prefab and the object in the scene will become a linked instance to it. This option is ideal when you want to maintain the prefab behavior.

On the other hand, you may choose to Only Create Preset to preserve the game object in the scene as independent of the prefab.

After selecting one of the options above, you will then be prompted to save the new prefab.

Note that in a later step you can customize the display name separately from the asset file name.

When the prefab is saved, an Advanced Preset component is added to store the preset configuration.

Why store preset information on the prefab directly?

This methodology makes the preset and prefab one in the same object, which makes them overall easier to manage, share, and use while benefiting from all that prefabs have to offer.

Will it affect runtime performance?

The Advanced Preset component is automatically removed from runtime and builds and is strictly used in the editor for preset configuration. It has zero impact on performance.

Editing Presets

After saving the preset, it should automatically be visible in the presets window.

Click the pencil icon to the right of the preset name field to edit it in isolation. The preset can be edited the same in either mode, but it can help to focus the view and remove clutter.

Name and Color

Select any color you like for the preset and give it an appropriate name. The smaller field on the left is shortened for button labels, while the larger field is the full descriptive name. Which name is displayed depends on the button width and layout settings in the view.

Prefab Asset

This field links to the underlying prefab asset and is read-only.

The prefab asset is not assignable since the Advanced Preset component is part of the prefab itself. There is no way currently to 'swap' one prefab with another, though you may simply add the other prefab to the group.

Refresh Asset

Click the refresh button if the prefab has changed on disk to reload the hierarchy into the presets view.

Preset Settings

The contents of the prefab are presented as a hierarchical list of components, with a checkbox next to each to select it for inclusion in the preset. Any items that are unchecked will be omitted when the preset is applied. This allows each preset to customize which components get applied.

You may notice that most of the Standard presets for Timeflow include only a single component. This is because these presets define a type of behavior and therefore don't change the appearance nor necessarily the transforms of an object.

TimeflowObject components are listed to be complete, however they almost never need to be included in presets since Timeflow will automatically generate them as needed. The only time a TimeflowObject may be useful in a preset is to enforce specific updating frequency or rules.

Insert Parent Group

If this option is checked, when the preset is applied to the target object, a new parent object is inserted into the scene hierarchy. Most presets will not use this option, however some presets with more complicated hierarchical setups may require it.

Apply to Parent Group

When a new parent group is inserted, the preset can either be applied starting at this new parent level, or if this option is disabled, the preset will be applied to the original target object as usual. Which option used depends on the setup of the preset. For most presets, a parent group is not needed.

Parent Group Example

For an example, see the Motion Path SCurve preset. Since the Motion Path component require a parent container to group the animated object with the path nodes.

After applying the preset, we can see that the 'Cube Group' parent object has been inserted in the hierarchy above Cube. The path nodes are hidden from the hierarchy by default but can be exposed in the Motion Path inspector to see where they are in the hierarchy. Without this group, the motion path would likely malfunction and the preset would be ineffective.

Transforms (Position, Rotation, Scale)

These checkboxes determine whether the transforms of the target object are affected when applying a preset. These should only be enabled for presets that define a specific placement, orientation, or directly affect the transform. Otherwise, uncheck these boxes so that the preset doesn't make unnecessary modifications.

Display All or Selected Only

Use the drop down menu to display the Select Only to hide all components and settings not included in the preset. This helps to hone in on what the preset does and nothing more.

Removing Presets

If you wish to remove a preset from a group, it can safely be removed without destroying or affecting the prefab. While in edit mode, simply select the preset row which will become highlighted in blue and then click the minus (-) button at the bottom of the list on the right.

Folders and Groups

Reordering

Folders and groups are not draggable, so to reorder them use the up and down arrow icons.

Moving and Copying

When the configuration settings are opened for a group or folder, click the +> menu to either copy or move the folder or group. This can be within the same collection, or to another collection.

When a copy is performed, once the folder/group is copied to the new location it is no longer connected with the original one and they may now be modified independently. However, the presets with each remain shared between the original new copy.

Removing

If you've added a group or folder you wish to remove, while in edit mode click the minus (-) button.

Creating Prefab Variants

There is a handy shortcut for creating Prefab Variants. Right-click on a preset button and select Create Variant from the context menu. Variants may of course also be created using Unity's built-in methods.

This creates a new prefab variant asset based on the original and will add the new variant into the current group. Once created, you can then open the prefab to modify it and configure the preset settings as needed.

The new prefab variant asset is automatically given a unique name
The new variant is then added to the group as a preset ready for modification

Applying Preset Colors

A helpful aid when setting up your presets is a built-in color menu for applying a wide array of coloring options. This includes random colors, pseudo-random sequenced colors, and more. You can even use Track Colors if you wish to sync your presets to your Timeflow track color scheme.

Last updated