🎨Advanced Presets

A newly revamped preset system for quick setups and animation

This feature is available in Timeflow v1.8.0 and later.

Overview

Timeflow offers two distinct preset types, Advanced Presets and Component Presets, each working independently of Unity’s native preset system.

Advanced Presets are prefab‑based, allowing you to bundle unlimited components, nested hierarchies, and complete animations into a single preset. You can either instantiate a brand‑new set of objects (preserving prefab linkage if desired) or stamp a preset onto existing game objects, either replacing or merging select components.

Advanced Presets are versatile and can be used in a number of creative ways. Since they are component and prefab based, presets can selectively change object appearances, behaviors, and animations. This makes it an effective tool to either swap or add new behaviors on objects.

Component Presets replace the old “behavior presets”. They capture settings for an individual component. For more information, see:

🎚️Component Presets

Both systems are accessible from the new Advanced Presets Window, which can be docked alongside the Timeflow Editor or anywhere in the layout. Multiple instances of the window can be opened and configured as needed.

Getting Started

This documentation will guide you through a typical setup, though feel free to adapt it to your own needs and preferences. If you're new to using Advanced Presets, it is recommended that you first get familiar using the provided sample presets before creating your own.

Open the Advanced Presets Window

From the Timeflow menu select Open Advanced Presets.

The window can then be docked next the Timeflow view, or anywhere you have easy access. Keep in mind that it may be necessary to adjust the width of the window from time to time.

Install Standard Presets

A collection of presets ship with Timeflow and can be installed either from the Package Manager in the Timeflow Samples, or in the Timeflow Preferences window.

Click Install Standard Presets to import them into your project.

If you see meta file warnings, they can be ignored.

Once installed, the Standard Presets can be found in Assets/Samples/Timeflow Animation System Samples

The Standard collection includes default and common presets for nearly all Timeflow behaviors, plus some bonus presets. To get the most out of Advanced Presets, you can create your own to not only replicate recurring setups, but to help manage and instantiate custom prefabs.

Advanced Presets Popup

In the Timeflow view, click on the preset icon in the switches panel to invoke the popup. The Advanced Presets popup window can be configured separately from the docked window, so you can customize it to your liking and quickly access the presets you want.

Note that the Component Presets icon has 2 sliders whereas the Advanced Presets icon has 3 .

The selected folder and group are managed separately in each view, so the popup window can be focused on one set of presets while docked instances of the Advanced Presets window can be showing other presets. This gives you the flexibility to arrange the preset palettes to your current workflow.

Clicking the preset icon at the top of the switches panel invokes the popup with Instantiate mode selected. Use this to quickly add new objects to your scene.

How Advanced Presets Work

Prefab‑Based Definitions

Each Advanced Preset is fundamentally a prefab with an attached Advanced Preset component. When you add a prefab into the Advanced Presets Window, Timeflow automatically injects the Advanced Preset component, converting it into a reusable preset asset. The prefab of course is still a prefab and can be used normally.

Storing preset information directly on the prefab improves the ability to move and share presets. It also means presets can safely be removed from groups without destroying the prefab or preset settings.

Unlimited Components & Full Hierarchies

Because an Advanced Preset is just a prefab, it can contain any number of child GameObjects, custom scripts, meshes, animations, etc. This allows you to package entire setups, camera rigs, animated characters, complex effect hierarchies, into one single preset.

Three Application Modes

The current mode can be set by clicking the mode icon in the menu bar.

  1. Instantiate: Creates a new GameObject instance of the preset's prefab with optional prefab linkage (set in the Collection settings panel).

  2. Replace: Applies the preset to an existing GameObject, replacing components of the same type with copies from the prefab.

  3. Combine: Merges property data with existing components or adds new components (if the component type allows multiple instances on the same GameObject).

Replace Mode Variations In some cases, such as when working with Keyframer presets, individual channels are replaced rather than whole components. Other component types such as Tween, on the other hand, replace the entire component each time.

Hierarchy & Component Merging

When stamping onto existing objects, Advanced Presets will:

  • Traverse the prefab hierarchy and match child GameObjects either by name or by child index, based on the Collection settings.

  • Add missing child objects or remove extras, if Add Children is enabled in the Collection settings.

  • For each component on a matching GameObject, either overwrite it entirely or blend/merge specified property values.

  • Custom Component Preset Types

    Some Timeflow components (e.g., Flyby) store more than simple property values, they hold animated channel data. By creating a custom “Component Preset Type,” you can package that data into an Advanced Preset as well. In effect, this extends Advanced Presets to capture any complex data your custom scripts expose.

Object Reference Mapping

One of the more complicated topics is managing how object references are reassigned when applying a preset to a target object. If the source objects have stored relationships, such as when a child component references another object or component in the hierarchy, these have to be remapped onto the target hierarchy to retain the relative relationships.

When using Instantiate mode, the prefab is instantiated as a whole new game object and Unity automatically handles object references. However, when using Replace and Combine modes, the process requires reference remapping since only certain components and settings are being copied over.

Advanced Presets offers 2 methods for matching object references:

Match by Index

Objects from the source prefab are matched to the target objects by their order in the hierarchy. This mode works best when the source and target have the same hierarchical structure but perhaps different naming. This is the default mode since it provides the most versatility.

Match by Name

Matches objects from the source prefab to the target hierarchy by locating each one by name. This works best when your target hierarchy differs from the prefab but has corresponding object names.

Adding Children

When the target hierarchy doesn't match the source hierarchy, additional children may be added automatically to match the preset structure. This behavior can be set in the Collection settings by enabling the checkbox for Add Children. Note that when this option is off, it may result in an incomplete application of the preset due to missing or unmatched objects.

Unlimited Collections and Nesting

  • You can organize presets into Collections (e.g., “Standard,” “YourCompanyAnimations,” etc.).

  • Within each Collection, create Folders, and within Folders create Groups (one level of subfolders) to categorize presets however you wish. Folders contain groups, and groups contain presets.

  • Each folder/group can be named, color‑coded, and assigned a custom icon to help visually distinguish different preset libraries.

Extensible Processing Pipeline

Under the hood, Advanced Presets are processed via a modular pipeline. You can hook into this pipeline with your own scripts, intercept preset‑loading, inject additional logic, or add custom post‑processing steps whenever a preset is applied.

IAdvancedPresetProcessor

To code your own extension for Advanced Presets, implement the interface IAdvancedPresetProcessor. This hooks in globally any time a preset is applied. For an example, please refer to TimeflowAdvancedPresetProcessor.cs. Additional explanation is provided within the code comments.

public interface IAdvancedPresetProcessor
{
    bool PreProcessComponent(AdvancedPresetProcessInfo info);
    bool Process(AdvancedPresetProcessInfo info);
    void GetDestination(AdvancedPresetProcessInfo info);
    bool ProcessComponent(AdvancedPresetProcessInfo info);
    void PostProcessComponent(AdvancedPresetProcessInfo info);
    void ProcessComplete(AdvancedPresetProcessInfo info);
}

IBehaviorPreset

Another way to add custom logic when presets are applied is to implement IBehaviorPresets in your MonoBehaviour scripts. This allows each component type to have specialized processing. You can also perform custom logic and data operations both when saving and applying a preset.

public interface IBehaviorPresets
{
    void OnBeforeSavePreset(ref List<ComponentPresetListItem> items);
    void OnSavePreset(AdvancedPreset objPreset = null, ComponentPreset compPreset = null);
    void OnPresetApplied(AdvancedPreset objPreset = null, ComponentPreset compPreset = null);
}

Note that IBehaviorPresets supports both Advanced Presets and Component Presets. Each time these methods are called, only one type of preset parameter is set while the other remains null.

FAQ

Do Advanced Presets work with 3rd party scripts?

Yes! Advanced Presets operate on Component types and thus support anything that is supported by Unity's prefab system. Likewise, Component Presets also work with any Component type. For custom integrations, the Advanced Presets API allows per-type extension to handle custom data and operations when saving and applying presets.

Last updated