Skip to main content

Sandbox Asset

This is a UObject that describes your asset and auto registers with Asset Registry. Sandbox Framework does not rely on any actors or components and solely uses Sandbox Assets to spawn desired actor in world so this is the first asset you create if you want to spawn a certain actor in world. Sandbox Assets are auto registered which means you only need to provide paths in Project Settings -> Sandbox Settings -> Asset Paths and simply create Sandbox Assets in these locations. At runtime, these locations are scanned for assets and load them automatically.

Note

If you do not provide a location to scan, whole game content will be scanned at runtime which can be slow depending on your project size.

The idea of Sandbox Asset is that you define the required properties in it and access them in your Actor class (in Blueprint or C++). To create a Sandbox Asset, right click inside Content Browser and choose Sandbox Asset from Sandbox context menu. sandbox asset screenshot

You will now be prompted to choose a parent class so choose one and press Select. A new Sandbox Asset will be created. Open it and you should see the below interface. sandbox asset screenshot

It is divided into 2 parts: Details and Viewport.

Details​

This is where all the properties are defined. It is important to remember that these properties have no implementation by default. You can access these properties in your Actor and drive the logic based on the values provided by this asset.

Viewport​

The viewport shows the mesh that you assign in details panel as well as additional information such as the approximate size of the mesh in various units. Everytime you change any property in details panel, the viewport will focus on the asset automatically.

Data Asset

Sandbox Assets are meant to be data assets so DO NOT add any logic via Event Graph. Only add variables.

Details

Extending Sandbox Asset Based on your project, you might need to add extra properties to Sandbox Asset. To do so, simply create a new Blueprint class based on Sandbox Asset like you do for normal Blueprint and use it as parent when creating new Sandbox Asset.



After creating your Sandbox Asset Blueprint Base, you can select it when creating new Sandbox Asset.