Presets

Customizations to an Objects Behaviours, Components, and Parameters can be saved for later use.

What is a Preset?

Presets are a way of saving the settings of an object so that you can reuse it without having to re-apply your preferred Parameters, Behaviours, Components, Messages or Triggers every time.

Not only does this save time when re-using a specific Object, but it allows you to customise Objects that might not appear in your experience until after a trigger occurs.

Creating a Preset

Let's take a look at how you can quickly and easily set up a Preset.

For this example, weโ€™re going to create a Preset for an enemy that drops a coin when defeated.

Choose an Asset

First, select an Asset to customize and drag it into the scene.

For this example, we'll use this Skeleton Warrior.

Customize the Object

In the Properties Panel make the necessary edits to the Behaviours and Components.

To make this Skeleton Warrior aggressive towards the player open Behaviour and choose Melee Enemy.

The Melee Enemy Behaviour adds a Health Component to the Object by default so the Enemy can be defeated.

Adjust the parameters to suit your needs by opening Edit Logic.

So that this Skeleton Warrior drops a coin when defeated click Add Components and choose Drop.

Leave Drop Condition to โ€˜Deathโ€™ and change the Type of Drop to Behaviour.

Type of Drop also has an option for Preset. Once you have a Preset saved, this lets you use your Preset to customize elements that haven't appeared in your experience yet.

For Asset to Spawn we'll use a Flashing SAND Coin from the Marketplace, and add the Collectable Component so that it can be collected by the avatar when it drops.

Save a Preset

With our Object customised with Behaviours and Components, we are ready to save it as a Preset.

A pop-up window will display an option to create a new Preset, as well as any existing presets you already have.

Click Create New and give the Preset a name, then click Done.

Itโ€™s that simple. Now the Preset is ready to use.

Accessing your Presets

To access Presets open the Library by pressing (L) and then navigate to the filter list on the left-hand side of the screen and click Preset.

Even if a single instance of a Preset is deleted from a scene it can be easily recovered from the Library.

Presets can be added to the toolbar or placed directly into your scene like any other Object, except that it already has the customized behaviour, components and parameters set and ready to go.

Presets have a white Icon to identify them.

Update a Preset

If you need to make edits you can easily update your Presets.

To update a Preset open the Library, find the desired Preset, drag it into the scene and select it.

Make the desired changes. In the example below the total health of the Skeleton Warrior is reduced so itโ€™s easier to defeat.

With the Object selected, click the Preset tool in the left toolbar.

When the preset window pops up, select the existing Preset and rename it.

Confirm the update by clicking Done.

All the changes, including the name of the Preset, will be updated in the Library and anywhere it has been used with an Asset Spawner or Drop Component.

Updating a Preset won't automatically update all the instances of the previous version in an experience. Use the Hierarchy to replace these with the new Preset.

Replace with a Preset

If you update a Preset and want to apply those changes to an old version of it in your experience you can do so using the Hierarchy.

You can also use this process to replace an Object with a completely different Preset.

Then select the Object you want to replace from the Hierarchy list.

You can click on an Object in the viewport to highlight it in the Hierarchy.

Once selected, click on the hamburger menu next to the Objects name.

In the dropdown menu click Replace with Preset and then select the Preset you want to use from the pop-up window.

Once you click done your Object will be replaced by the chosen Preset.

Change a Presets Asset

You can also completely change a Preset with a new Object while preserving instances in which that Preset has been used to spawn an Asset.

Changing a Preset with a new Object won't keep the existing customisations.

Drag the Asset you want to use as a replacement into the scene and make adjustments to its Behaviours and Components as needed.

With the new Object selected, open the Preset tool and find the Preset you want to replace.

For this example, we'll replace the Skeleton Warrior Preset.

Give the Preset a new name and click done.

As soon as you've clicked done, the Presets new name, new Asset, and associated behaviour, components, and parameters, will be reflected in the Library and locations the previous Preset had been used with a spawner.

This will completely override the previous object and its customisations

You'll no longer have a backup in the Preset section of the Library.

If you donโ€™t still have a version of the Preset you're replacing somewhere in your experience, youโ€™ll need to redo the setup if you still wanted to use it.

If you do replace an existing Preset this way, consider making a duplicate before going ahead if youโ€™re likely to use it in other areas of your experience.

Delete a Preset

If youโ€™re certain you no longer need a Preset or end up with too many versions of a preset, you can declutter your list by deleting the ones you don't want.

Open your Library, find the desired Preset, right-click on it and choose Delete.

Keep in mind that any behaviour or component currently using that Preset for a drop or spawn will no longer function as intended.

Spawning Presets

Presets can be used to customize Assets that only appear once they've been triggered in an experience.

Default vs Preset

When using the Asset Spawner or Drop Component without Presets you can only make a limited number of customizations.

For example, a Health Component can be added to the Asset to Spawn, but the variables, such as how much health that Object, can't be customized.

This problem is solved by using Presets because all of the customizations have already been saved and will be retained when used as the Asset to Spawn.

Spawning a Preset

For example, perhaps we only want the Skeleton Warrior we created to appear once an Object has been destroyed.

To do this, we'll first drag the Asset we need into the scene, we'll use a Crate that the Skeleton Warrior will be hiding in.

First, we'll add the Health Component so the Object can be attacked and destroyed.

We'll then add the Drop Component, change the Type of Drop to Preset and select the Skeleton Warrior from the Preset pop-up window.

Now when the crate is destroyed our customised Skeleton Warrior will spawn with all the variables we defined in the Preset, including the Drop Component for the collectable coin.

Stacking Presets

Once you've tried out the basics, you might start to notice that you can layer Presets on top of each other when they are used with Behaviours or Components that spawn them.

Create a New Preset

For example, the coin dropped by the Skeleton Warrior could be Preset, allowing further customisation than the default settings.

This would open up the opportunity to change its name, adjust the Collectable Component, and even try out something like the Bird Behaviour to achieve a floating motion once itโ€™s spawned.

With the changes in place, we'll save the Preset by clicking the Preset tool, followed by Create New, and then giving it a name.

Add New Preset to an Exisiting Preset

With the new Preset saved, we then need to place the Skeleton Warrior Preset in the scene so we can update the Drop Component with the new coin Preset.

With the Skeleton Warrior selected, change the Type of Drop in the Drop Component from Behaviour to Preset, and select the newly customised Magic Coin Preset.

Save the change by clicking the Preset tool, selecting the exisiting Preset, renaming it, and then clicking done.

The Skeleton Warrior Preset will now drop the Magic Coin Preset when defeated.

Adding Another Layer

This change will also be reflected in any areas the Preset had been used with a spawner, so in this case, the Drop Component on the Crate will have these changes applied to it.

And yes, if you're following the same train of thought, the Crate can also be saved as a Preset by following the same steps.

So now the Crate Preset spawns the Skeleton Warrior Preset and a Skeleton Warrior Preset spawns the Magic Coin Preset.

Since the Crate Preset is saved to the Library it can easily be dragged into the scene as many times as needed, and every instance will contain all of the customisations made so far.

Parenting and Presets

The last tip in this list is that you can also save Hierarchy settings in a Preset.

This means if an Object is a Parent to other Objects, the Preset will retain those relationships.

When the Preset is placed in the scene any Objects that were Children to the Parent Object will also be placed in the scene and will maintain their orientation to the Parent.

To show how this works, we're going to take a desk Asset and customise it with a houseplant and a chair.

In case we want to move this arrangement, we're going to Parent them together so that both these objects move wherever the desk moves.

Parenting Objects

To do this make sure all your Objects are in the scene.

With the Hierarchy window open find the Objects you want to use.

To Parent the houseplant and the chair to the desk, click, hold, and drag each Object, one at a time, onto the desk in the Hierarchy.

Now if the desk moves, the plant and chair will move with it.

Add Parent as Preset

So that this setup can be used multiple times we just need to select the Parent asset, in this case, the desk, and then click the Preset tool and save it as a new Preset.

Now we can go to the Library the desk Preset can be dragged into the scene and it will include the other Objects parented to it, and they'll still move where the parent Object moves.

This is a simple example, but this same principle can be used to achieve complex arrangements of objects, behaviours, components, and even messages.

For example, you could create a platform with a switch that toggles the movement of the platform.

You could then parent that switch to the platform so that even when the platform moves, the switch will move with it.

If you wanted to use this set up multiple times in your experience without needing to rebuild it every time, you could save it as a Preset, and then access it from the Library for easy placement.

Last updated