mass_add_trait
Add a trait class to a MassEntity config asset in Unreal Editor, returning the updated trait list. Use this to extend entity behavior by assigning traits directly to the specified config asset.
Instructions
Add a trait class to a MassEntity config asset.
Args: config_asset: MassEntity config asset path or object path. trait_class: MassEntity trait class, short name or /Script path. save: Save the asset after mutation.
Returns: Structured JSON with the added trait and updated trait list.
KB: see knowledge_base/23_MASS_ENTITY_AND_STATETREE.md#mcp-mass-statetree-and-smartobject-tools Example: mass_add_trait(config_asset="/Game/Mass/EntityConfigs/EC_CrowdAgent", trait_class="MassLODTrait")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | ||
| trait_class | Yes | ||
| config_asset | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |