Give Page Feedback | API

Scriptable Assets - Default Asset Creator

The Default Asset Creator is a general implementation of an Asset Creator, which is used exclusively by the World Designer Tool to automatically generate Asset Chunks when needed. You can learn more about Asset Creators in general by viewing the dedicated Asset Creators within the World Designer Tool Chapter.

Asset Creators

Creating A Default Asset Creator Asset

You can create this asset manually by selecting the folder where you wish to create it and selecting from the Top Menu Bar:

Assets -> Create -> Deep Space Labs -> SAM -> Default Asset Creator

Creating A Default Asset Creator From The Top Menu Bar GIF

or right clicking a folder (or inside a folder) within the Project Hierarchy and selecting from the pop up menu:

Create -> Deep Space Labs -> SAM -> Default Asset Creator

Creating A Default Asset Creator From Right Click GIF

By default this Asset is given the name DefaultAssetCreator, however we recommend changing this name to something that will better help you differentiate it with other Default Asset Creator Assets in the future.

Prefabs And/Or Scenes

The Default Asset Creator is capable of creating prefab and scene assets. You can choose to create one or the other, or choose to create both at the same time. The Asset Creation Mode option controls this behavior.

If you have the Addressables Package installed in your project, you will see additional options that allow the created prefabs and/or scenes to be automatically converted into addressable assets.

When creating both types of assets (i.e., when setting Asset Creation Mode to Prefabs_And_Scenes, you need to specify which type of assets are the Primary Assets.

The primary assets are the assets which you are immediately planning on using, as indicated by the type of Chunk Streamer you have assigned to load the LOD Group's Asset Chunks. For instance, if using a Prefab Chunk Streamer, you would set the Primary Assets to Prefabs.

The value you choose is used to avoid creating certain test assets (used by the World Designer Tool to ensure the Creator has been configured correctly) any time the Creator would be used. If not configured correctly, assets may not be cleaned up properly.

Prefabs Chunk Templates

The Default Asset Creator supports multi chunk setups in the form of Prefab Chunk Templates, though note that Templates are only available when the Asset Creation Mode is set to Only_Prefabs or Prefabs_And_Scenes.

Each Template you add will correspond directly with an Asset Chunk. The template at Element 0 will correspond to Chunk 1, Element 1 with Chunk 2, and so on. This allows you to create different types of game objects for each Asset Chunk (though note, it is unlikely that you will require this functionality).

If an element is null, an empty Game Object will be created for the corresponding Asset Chunk. If an Asset Chunk does not have a corresponding Template (for instance, Asset Chunk 4 is being created but there are only 3 templates present), the Element 0 Template will be used for it. This allows you to add a single Template to be used for all Asset Chunks if you wish.

You can use a template with a Terrain component as well, though note that the Terrain component must be directly on the template game object rather than on one of the templates child/grandchild/etc. objects.

One Creator Per Asset Chunk Group

In most cases you will wish to use a separate Default Asset Creator for each Asset Chunk Group. This is because each Asset Creator is only able to output assets to a single folder for generated prefabs and a single folder for generated scenes, and is able to only use a single set of settings. While you could output Assets from different Asset Chunk Groups to the same folder, it is usually better practice to keep the Asset Chunk Group Assets in separate folders.

In addition, when creating Addressable Assets, each creator can only add prefabs to a single Addressable Group and scenes to another. Since Asset Chunk Groups usually should be in a separate Addressable Groups, it does not make sense to use a single Default Asset Creator for all Groups.

You can easily duplicate an existing Default Asset Creator and then change some of the settings in order to make new Asset Creators for additional Asset Chunk Groups!

Adding Scenes To The Build Settings

When outputting Non-Addressable Scenes (either alone or along with Prefabs with the Scenes set as the Primary Assets), the Add To Build Settings option should almost always be on.

Disabling this option will almost certainly cause whatever operation is being executed via the World Designer Tool to fail, since the Scene based Asset Manager will not be able to load the scenes that the Default Asset Creator creates.

Unless you know what you are doing and know that disabling this option will not result in errors, PLEASE DO NOT DISABLE THIS OPTION!

The Root State

The Root State setting defined on each LOD Group (in the Streamable Grid asset) is used by the Default Asset Creator when creating scene based Asset Chunks. If this setting is set to Activated (not recommended), the root game object created in each scene will be saved in an activated state. If it is set to Deactivated, the game objects will be saved in a deactivated state (recommended).

An Activated Root State is generally only recommended if you need to make use of Build Time Static Batching. Please check out the dedicated section in the FAQ for more information: