Navigation
API > API/Runtime > API/Runtime/MassEntity > API/Runtime/MassEntity/FMassEntityManager > API/Runtime/MassEntity/FMassEntityManager/GetOrCreateSharedFragment
References
| Module | MassEntity |
| Header | /Engine/Source/Runtime/MassEntity/Public/MassEntityManager.h |
| Include | #include "MassEntityManager.h" |
const FSharedStruct & GetOrCreateSharedFragment
(
const UScriptStruct & InScriptStruct,
const uint8 * InStructMemory
)
Remarks
Returns or creates a shared struct associated to a given shared fragment set of values identified internally by a CRC. Use this overload when the reflection data and the memory of an instance of the desired shared fragment type is available and that can be used directly to compute a CRC (i.e., UE::StructUtils::GetStructCrc32) e.g., FSharedStruct SharedStruct = EntityManager.GetOrCreateSharedFragment(*StructView.GetScriptStruct(), StructView.GetMemory());
@params InScriptStruct Reflection data structure associated to the desired fragment type @params InStructMemory Actual data of the desired fragment type FSharedStruct to the matching, or newly created shared fragment