AddToLevel

Summary

This behaviour will add any asset in the scene to a level layer. The level layer it gets added to can be toggled on or off from the levels / layers page from the UI bar.

When an asset is added, a level name must be specified. If no name is specified it will use the asset's name for the level name.

If no level of the specified name exists, it will be created using the asset as the base asset for the level. Each related asset to the specified asset will also be added to the level by default, however this can be toggled by using the AndChildren parameter.

Parameters

LevelName

Type: Text Default: none

The name of the level or layer to add this asset to. If no level of the same name exists, one will be created using this asset as the base asset.

AndChildren

Type: Boolean Default: True

If true, each asset that has a forwards relationship with the base asset will be searched and also added to the level.

Examples

<AddToLevel LevelName="Tanks" />
The above code, when placed on an asset, will add the asset and all of its related assets to a level named Tanks. If no level named Tanks exists, one will be created and this asset will be added as the base asset.
<AddToLevel LevelName="Building Floor 1" AndChildren="False" />
The above code, when placed on an asset, will add only the asset containing this code to the level. If the asset containing has any assets with forward relationships, they will be ignored.