The Preset System allows you to take a snapshot of all of the properties in a component and save it to an asset. Presets can be loaded via script at runtime and used to quickly manipulate all of the parameters of a component as needed during gameplay.

Create Presets

Objects which allow presets will have a reorderable list displayed at the bottom of its inspector under the “States” foldout. New presets can be created by clicking the plus button on the bottom right of the reorderable list. A menu will then appear and “Create New Preset” should be selected:

Adding Properties

For best performance only C# properties can be added to presets. The property must have a public get and set attribute in order for it to be visible to the preset system. Presets can store any type of serializable file besides references to objects within a scene. This is a Unity restriction and occurs because project-level files (such as presets) cannot reference objects within a scene.

The property can then be selected within the “Add Property” dropdown after clicking on the preset. In this example a preset for the Jump ability is selected:

Removing Properties

After a property is added it can be removed by clicking on the “X” button on the right to the property value: