✍️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.
Creating a Collection
There are several ways to create a new preset collection.
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

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.

Folder Structure
How assets are organized is of course up to you and there are no prerequisites, however it is suggested that presets are collected and logically organized into their own asset folder. This makes them easier to backup, share, and maintain.
For an example, refer to the Standard presets included with Timeflow.
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.
Click the pencil icon to enable editing
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.
If you already have a library of prefabs in your project, you can quickly add them into preset collections. Simply drag and drop the prefabs into the view, or a folder containing prefabs. Note that this does add the Advanced Preset component to the prefabs, but it has impact other than to store preset settings.
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.
Tip: To drag an object in the Timeflow view, click towards the left on the object name or icon. Clicking too far right invokes the marquee selection tool instead of dragging the object.
Dragging and dropping game objects from the scene is limited to 1 root object at a time. If multiple objects are selected, only the first object in the selection is handled.
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.

Although not required, it is recommended to save preset prefabs in organized folders, ideally matching those defined in the collection.
When the prefab is saved, an Advanced Preset component is added to store the preset configuration.

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

The goal here is to uncheck all components and settings which are not required so that the preset is reduced down to it's most essential. If for example you only care about this Cube asset updating the mesh, you could uncheck every component except the MeshFilter. Then when the preset is applied, only the mesh is replaced while preserving the object's existing materials and collider setups.
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.

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.
You may also press the Delete or Backspace key after selecting the row to delete it.

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

The reordering arrow buttons are only visible while in Edit Mode and in List layout mode.
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.
The same preset may appear in multiple groups in the same or across multiple collections, however it remains the same preset across all. That means if you make changes to the preset in one, it will appears the same in others. If you wish to create variations of presets with separate instances, use Prefab Variants.
Removing
If you've added a group or folder you wish to remove, while in edit mode click the minus (-) button.

Removing folders, groups, or presets from a collection does not destroy the underlying prefabs or assets. However, the configuration settings (icon, color, layout settings, etc) are removed permanently along with the folder or group.
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.


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.

Pro Tip Set the first and last color in the list of presets, and then select Interpolate from the menu to apply a gradient.


Last updated