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 Player game object "Add Component" button at the bottom of the Inspector and look for the Traits component.

Traits in Editor

Once the Player has the Traits component a message appears prompting 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 overriden, 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