![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <MassEntityRelations.h>
Public Member Functions | |
| bool | operator== (const FRoleTraits &Other) const |
Public Attributes | |
| const UScriptStruct * | Element = nullptr |
| ERemovalPolicy | DestructionPolicy = ERemovalPolicy::Default |
| bool | bExclusive = true |
| EExternalMappingRequired | RequiresExternalMapping = EExternalMappingRequired::Default |
|
inline |
"Exclusive" means there can be only one participant like this in a relation. For example, there can be only one parent in our ChildOf relation (bExclusive = true, on the "parent" participant, i.e. the Object) while there can be multiple children (bExclusive = false for the Subject)
| ERemovalPolicy UE::Mass::Relations::FRoleTraits::DestructionPolicy = ERemovalPolicy::Default |
What to do when entities serving this role are destroyed. This value affects the whole relation, including other participants.
| const UScriptStruct* UE::Mass::Relations::FRoleTraits::Element = nullptr |
The element type that will be added to the participating entity. Can remain empty. Every entity will get the relation tag as well, the FRelationTypeTraits.RelationTagType
| EExternalMappingRequired UE::Mass::Relations::FRoleTraits::RequiresExternalMapping = EExternalMappingRequired::Default |
Declares whether this relation-specific implementation details provide dedicated mechanism for mapping other roles for entities serving as this role, the role these traits affect. It essentially answers whether this role needs the system to find other relation participants (Yes) or it can handle the task with custom code (like via the Element, option No).
Defaulting to Yes to provide reliable, out-of-the-box functionality required for fetching participants of relation instances. Set to No if you want to save memory by not automatically populating and utilizing FRelationData.RoleMap.