Unreal Engine's Mass: Traits & Entity Templates
July 03, 2026 · 3 min read
A description of Traits & Entity Templates within Unreal Engine's Mass.
This blog post was written in reference to Unreal Engine 5.8
Overview
Traits(UMassEntityTraitBase) are UObject type’s, declared Abstract and EditInlineNew, that allow for designers
to configure Entity Template’s and configure their default values within the editor. You can add not just Fragment
configurations but also specific parameters to additionally configure the Trait for a better UX.
A Trait is not an asset on its own. Traits are Instanced subobjects held by an FMassEntityConfig, and the
UDataAsset in this system is UMassEntityConfigAsset, which wraps that config. So the workflow is: author a Mass
Entity Config asset, then add Trait instances inline to its Traits array. Config assets can also inherit from a Parent
config, which is how Trait sets get shared rather than by referencing a Trait as an asset.
Traits are also where you can add default Tags and Fragments to an Entity while its Entity Template
(FMassEntityTemplateData) is being built, by overriding ::BuildTemplate() on the Trait’s type. Every Trait writes
into a shared FMassEntityTemplateBuildContext, and only once all of them have contributed does Mass hand the
finished composition to FMassEntityManager::CreateArchetype() and store the resulting FMassArchetypeHandle on the
finalized FMassEntityTemplate. So Traits configure the Template, and the Archetype is derived from it afterwards.
void UMyTrait::BuildTemplate(FMassEntityTemplateBuildContext& BuildContext, const UWorld& World) const
{
BuildContext.AddFragment<FTransformFragment>();
BuildContext.AddTag<FMyTag>();
}