UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::FGlobalDirtyNetObjectTracker Class Reference

#include <GlobalDirtyNetObjectTracker.h>

Classes

class  FPimpl
 
struct  FPollHandle
 

Public Types

using FDirtyPropertyStorage = TArray< FNetBitArrayBase::StorageWordType, TInlineAllocator< 4 > >
 
using FDirtyHandleAndPropertyMap = TMap< FNetHandle, FDirtyPropertyStorage >
 

Public Member Functions

 DECLARE_DELEGATE (FPreResetDelegate)
 

Static Public Member Functions

static NETCORE_API bool IsUsingPerPropertyDirtyTracking ()
 
static NETCORE_API void MarkNetObjectStateDirty (FNetHandle, const int32, const int32)
 
static void MarkNetObjectStateDirty (FNetHandle Handle)
 
static NETCORE_API FPollHandle CreatePoller (FPreResetDelegate InPreResetDelegate)
 
static NETCORE_API const TSet< FNetHandle > & GetDirtyNetObjects (const FPollHandle &Handle)
 
static NETCORE_API const FDirtyHandleAndPropertyMapGetDirtyNetObjectsAndProperties (const FPollHandle &Handle)
 
static NETCORE_API void LockDirtyListUntilReset (const FPollHandle &Handle)
 
static NETCORE_API void ResetDirtyNetObjects (const FPollHandle &)
 
static NETCORE_API bool ResetDirtyNetObjectsIfSinglePoller (const FPollHandle &)
 

Static Protected Member Functions

static void Init ()
 
static void Deinit ()
 

Protected Attributes

friend FNetCoreModule
 

Member Typedef Documentation

◆ FDirtyHandleAndPropertyMap

◆ FDirtyPropertyStorage

Member Function Documentation

◆ CreatePoller()

FGlobalDirtyNetObjectTracker::FPollHandle UE::Net::FGlobalDirtyNetObjectTracker::CreatePoller ( FPreResetDelegate  InPreResetDelegate)
static

Create a poller which is assumed to call PollDirtyNetObjects(). Assumes Init() has been called.

◆ DECLARE_DELEGATE()

UE::Net::FGlobalDirtyNetObjectTracker::DECLARE_DELEGATE ( FPreResetDelegate  )

Delegate called on pollers that haven't gathered dirty state before it resets

◆ Deinit()

void UE::Net::FGlobalDirtyNetObjectTracker::Deinit ( )
staticprotected

Destroys the instance if it exists.

◆ GetDirtyNetObjects()

const TSet< FNetHandle > & UE::Net::FGlobalDirtyNetObjectTracker::GetDirtyNetObjects ( const FPollHandle Handle)
static

Returns the objects with dirty state. The reference can only be assumed to be valid until the next call to ResetDirtyNetObjects(). A matching call to ResetDirtyNetObjects() is required but should not be called until all pollers have had the chance to call GetDirtyNetObjects(). Assumes Init() has been called.

◆ GetDirtyNetObjectsAndProperties()

const FGlobalDirtyNetObjectTracker::FDirtyHandleAndPropertyMap & UE::Net::FGlobalDirtyNetObjectTracker::GetDirtyNetObjectsAndProperties ( const FPollHandle Handle)
static

Returns the objects with dirty state including per property dirtiness. The reference can only be assumed to be valid until the next call to ResetDirtyNetObjects(). A matching call to ResetDirtyNetObjects() is required but should not be called until all pollers have had the chance to call GetDirtyNetObjects(). Assumes Init() has been called.

◆ Init()

void UE::Net::FGlobalDirtyNetObjectTracker::Init ( )
staticprotected

If push model is compiled in Init() creates a new instance that is used by functions that need it. Checks that no instance exists.

◆ IsUsingPerPropertyDirtyTracking()

bool UE::Net::FGlobalDirtyNetObjectTracker::IsUsingPerPropertyDirtyTracking ( )
static

Returns true if we are tracking dirtiness per property.

◆ LockDirtyListUntilReset()

void UE::Net::FGlobalDirtyNetObjectTracker::LockDirtyListUntilReset ( const FPollHandle Handle)
static

Detect any updates to the dirty list until all pollers have gathered and reset the list.

◆ MarkNetObjectStateDirty() [1/2]

static void UE::Net::FGlobalDirtyNetObjectTracker::MarkNetObjectStateDirty ( FNetHandle  Handle)
inlinestatic

Marks an object as dirty. Assumes Init() has been called.

◆ MarkNetObjectStateDirty() [2/2]

void UE::Net::FGlobalDirtyNetObjectTracker::MarkNetObjectStateDirty ( FNetHandle  NetHandle,
const int32  StartRepIndex,
const int32  EndRepIndex 
)
static

Marks an object as dirty. Assumes Init() has been called.

◆ ResetDirtyNetObjects()

void UE::Net::FGlobalDirtyNetObjectTracker::ResetDirtyNetObjects ( const FPollHandle Handle)
static

Clears the set of dirty net objects. GetDirtyNetObjects() must be called first. Some synchronization is needed between pollers such that all pollers have the chance to call GetDirtyNetObjects() first. It may be a good idea to have the polling done in a NetDriver TickFlush() or similar and resetting done in PostTickFlush(). Assumes Init() has been called.

◆ ResetDirtyNetObjectsIfSinglePoller()

bool UE::Net::FGlobalDirtyNetObjectTracker::ResetDirtyNetObjectsIfSinglePoller ( const FPollHandle Handle)
static

Reset the list of dirty net objects but only if there is a single poller registered in the system. Returns true if the reset was executed.

Member Data Documentation

◆ FNetCoreModule

friend UE::Net::FGlobalDirtyNetObjectTracker::FNetCoreModule
protected

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