Navigation
API > API/Runtime > API/Runtime/MassEntity > API/Runtime/MassEntity/FMassEntityManager
Description
The main use-case for this function is to create a blank FEntityCreationContext and hold on to it while creating a bunch of entities (with multiple calls to BatchCreate* and/or BatchBuild*) and modifying them (with mutating batched API) while not causing multiple Observers to trigger. All the observers will be triggered at one go, once the FEntityCreationContext instance gets destroyed.
!Important note: the "Creation Context" is a specialized wrapper for an "Observers Lock" (
| Name | GetOrMakeCreationContext |
| Type | function |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityManager.h |
| Include Path | #include "MassEntityManager.h" |
| Source | /Engine/Source/Runtime/MassEntity/Private/MassEntityManager.cpp |
TSharedRef < FEntityCreationContext > GetOrMakeCreationContext()
the existing (if valid) or a newly created creation context
See Also
-
GetOrMakeObserversLock). As long as the creation context is alive all the operations will be assumed to affect the newly created entities. The consequence of that is operations performed on already existing entities won't be tracked
-
as long as the creation context is alive. Note that you can hold a FMassObserverManager::FObserverLock instance while the creation lock gets destroyed
-
the observers lock is a lower-level concept than the creation context.