Navigation
API > API/Runtime > API/Runtime/MassEntity > API/Runtime/MassEntity/FMassEntityManager
References
| Module | MassEntity |
| Header | /Engine/Source/Runtime/MassEntity/Public/MassEntityManager.h |
| Include | #include "MassEntityManager.h" |
| Source | /Engine/Source/Runtime/MassEntity/Private/MassEntityManager.cpp |
bool AddConstSharedFragmentToEntity
(
const FMassEntityHandle Entity,
const FConstSharedStruct & InConstSharedFragment
)
Remarks
Adds a new const shared fragment to the given entity. Note that it only works if the given entity doesn't have a shared fragment of the given type. The function will give a soft "pass" if the entity has the shared fragment of the same value. Setting shared fragment value (i.e. changing) is not supported and the function will log a warning if that's attempted. whether the Entity has the Fragment value assigned to it, regardless of its original state (i.e. the function will return true also if the Entity already had the same values associated with it)