Skip to content

Traits

Traits are components that link a Class asset with a scene game object.

Game Objects with Traits

It is important to note that, although Characters will most likely be the objects with a Traits component, these can be attached to any game object.

For example, to assign the Player with the Knight Class one just has to click on the "Add Component" button at the bottom of the Player game object's Inspector and look for the Traits component (found under Game Creator → Stats).

Traits in Editor

Once the Player has the Traits component, a message appears prompting you to assign it a Class asset.

Traits missing Class asset

Drag and drop any Class asset onto the designated field and it will change its appearance to display the asset's information.

Traits with Class asset

Each Attribute and Stat can be expanded and their values can be overridden, just like in the Class asset.

Traits at Runtime

Once the game object has a Traits component linked with a Class asset, it is ready to interact in play mode.

To help the designer understand what's happening in play mode and debug any possible problems, the Traits component changes its Inspector appearance to display real-time information about its current Attribute and Stat values.

Traits in Playmode