UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMassRelationFragment Struct Reference

#include <MassEntityRelations.h>

+ Inheritance diagram for FMassRelationFragment:

Public Member Functions

FMassEntityHandle GetRole (const int32 Index) const
 
FMassEntityHandle GetRole (const UE::Mass::Relations::ERelationRole Role) const
 

Public Attributes

FMassEntityHandle Subject
 
FMassEntityHandle Object
 

Detailed Description

Relation fragment base. Every relation entity will get an instance of this type or a type derived from it (as configured via FRelationTypeTraits.RelationFragmentType

Member Function Documentation

◆ GetRole() [1/2]

FMassEntityHandle FMassRelationFragment::GetRole ( const int32  Index) const
inline

◆ GetRole() [2/2]

FMassEntityHandle FMassRelationFragment::GetRole ( const UE::Mass::Relations::ERelationRole  Role) const
inline

Member Data Documentation

◆ Object

FMassEntityHandle FMassRelationFragment::Object

This is the "what" or "target" part of the relation. Examples:

  • the Parent in a ChildOf relation
  • the Weapon in a HasWeapon relation
  • the Company in a WorksFor relation

◆ Subject

FMassEntityHandle FMassRelationFragment::Subject

This is the "who" part of the relation. Examples:

  • the Child in a ChildOf relation
  • the Character in a HasWeapon relation
  • the Employee in a WorksFor relation

The documentation for this struct was generated from the following file: