Navigation
API > API/Runtime > API/Runtime/MassEntity > API/Runtime/MassEntity/FMassEntityManager
Description
Fetches the observers lock (as hosted by FMassObserverManager). If one is not currently active, one will be created. While the lock is active all the observers notifications are suspended, and will be sent out when FMassObserverManager::FObserverLock instance gets destroyed. Locking observers needs to be used when entities are being configured with multiple operations, and we want observers to be triggered only once all the operations are executed.
Note that while the observers are locked we're unable to send "Remove" notifications, so once the lock is released and the observers get notified, the data being removed won't be available anymore (which is a difference in behavior as compared to removal notifications while the observers are not locked).
| Name | GetOrMakeObserversLock |
| Type | function |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityManager.h |
| Include Path | #include "MassEntityManager.h" |
TSharedRef < UE::Mass::ObserverManager::FObserverLock > GetOrMakeObserversLock()