UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Mass::ObserverManager::FObserverLock Struct Reference

#include <MassObserverNotificationTypes.h>

Public Member Functions

 FObserverLock ()=default
 
UE_API ~FObserverLock ()
 
TWeakPtr< FMassEntityManagerGetWeakEntityManager () const
 
void MarkCreationNotificationDirty (FCreationNotificationHandle CreationHandle)
 
const FBufferedNotificationGetCreationNotification (FCreationNotificationHandle CreationHandle) const
 

Detailed Description

Once created with MassObserverManager.GetOrMakeObserverLock will prevent triggering observers and instead buffer all the notifications to be sent. Once the FObserverLock gets released it will call MassObserverManager.ResumeExecution that will send out all the buffered notifications.

Note
that due to the buffering, all the "Remove" operation observers will be sent out later than usually - without locking those observers get triggered before the removal operation is performed, and as such have access to the data "about to be removed". Removal observers sent out after lock release won't have access to that information.

There's a special path for freshly created entities, see FCreationContext for more details.

Constructor & Destructor Documentation

◆ FObserverLock()

UE::Mass::ObserverManager::FObserverLock::FObserverLock ( )
default

◆ ~FObserverLock()

UE::Mass::ObserverManager::FObserverLock::~FObserverLock ( )

Member Function Documentation

◆ GetCreationNotification()

const FBufferedNotification & UE::Mass::ObserverManager::FObserverLock::GetCreationNotification ( FCreationNotificationHandle  CreationHandle) const
inline

◆ GetWeakEntityManager()

TWeakPtr< FMassEntityManager > UE::Mass::ObserverManager::FObserverLock::GetWeakEntityManager ( ) const
inline

◆ MarkCreationNotificationDirty()

void UE::Mass::ObserverManager::FObserverLock::MarkCreationNotificationDirty ( FCreationNotificationHandle  CreationHandle)
inline

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