UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FNetworkObjectList Class Reference

#include <NetworkObjectList.h>

Classes

struct  FSubObjectChannelReference
 
struct  FSubObjectChannelRefKeyFuncs
 

Public Types

typedef TSet< TSharedPtr< FNetworkObjectInfo >, FNetworkObjectKeyFuncsFNetworkObjectSet
 

Public Member Functions

ENGINE_API void AddInitialObjects (UWorld *const World, UNetDriver *NetDriver)
 
ENGINE_API TSharedPtr< FNetworkObjectInfo > * FindOrAdd (AActor *const Actor, UNetDriver *NetDriver, bool *OutWasAdded=nullptr)
 
ENGINE_API TSharedPtr< FNetworkObjectInfoFind (AActor *const Actor)
 
const TSharedPtr< FNetworkObjectInfoFind (const AActor *const Actor) const
 
ENGINE_API void Remove (AActor *const Actor)
 
ENGINE_API void MarkDormant (AActor *const Actor, UNetConnection *const Connection, const int32 NumConnections, UNetDriver *NetDriver)
 
ENGINE_API bool MarkActive (AActor *const Actor, UNetConnection *const Connection, UNetDriver *NetDriver)
 
ENGINE_API void MarkDirtyForReplay (AActor *const Actor)
 
ENGINE_API void ResetReplayDirtyTracking ()
 
ENGINE_API void ClearRecentlyDormantConnection (AActor *const Actor, UNetConnection *const Connection, UNetDriver *NetDriver)
 
ENGINE_API void OnActorIsTraveling (AActor *TravelingAtor)
 
ENGINE_API void OnPostSeamlessTravel ()
 
ENGINE_API void HandleConnectionAdded ()
 
ENGINE_API void ResetDormancyState ()
 
const FNetworkObjectSetGetAllObjects () const
 
const FNetworkObjectSetGetActiveObjects () const
 
const FNetworkObjectSetGetDormantObjectsOnAllConnections () const
 
ENGINE_API int32 GetNumDormantActorsForConnection (UNetConnection *const Connection) const
 
ENGINE_API void ForceActorRelevantNextUpdate (AActor *const Actor, UNetDriver *NetDriver)
 
ENGINE_API void Reset ()
 
ENGINE_API void CountBytes (FArchive &Ar) const
 
ENGINE_API void FlushDormantActors (UNetConnection *const Connection, const FName &PackageName)
 
ENGINE_API void OnActorDestroyed (AActor *DestroyedActor)
 

Detailed Description

Stores the list of replicated actors for a given UNetDriver.

Member Typedef Documentation

◆ FNetworkObjectSet

Member Function Documentation

◆ AddInitialObjects()

void FNetworkObjectList::AddInitialObjects ( UWorld *const  World,
UNetDriver NetDriver 
)

Adds replicated actors in World to the internal set of replicated actors. Used when a net driver is initialized after some actors may have already been added to the world.

Parameters
WorldThe world from which actors are added.
NetDriverThe net driver to which this object list belongs.

◆ ClearRecentlyDormantConnection()

void FNetworkObjectList::ClearRecentlyDormantConnection ( AActor *const  Actor,
UNetConnection *const  Connection,
UNetDriver NetDriver 
)

Removes the recently dormant status from the passed in connection

◆ CountBytes()

void FNetworkObjectList::CountBytes ( FArchive Ar) const

◆ Find() [1/2]

TSharedPtr< FNetworkObjectInfo > FNetworkObjectList::Find ( AActor *const  Actor)

Attempts to find the Actor's FNetworkObjectInfo.

If info is not found (or the Actor is in an invalid state) an invalid TSharedPtr is returned.

◆ Find() [2/2]

const TSharedPtr< FNetworkObjectInfo > FNetworkObjectList::Find ( const AActor *const  Actor) const
inline

◆ FindOrAdd()

TSharedPtr< FNetworkObjectInfo > * FNetworkObjectList::FindOrAdd ( AActor *const  Actor,
UNetDriver NetDriver,
bool OutWasAdded = nullptr 
)

Attempts to find the Actor's FNetworkObjectInfo. If no info is found, then the Actor will be added to the list, and will assumed to be active.

If the Actor is dormant when this is called, it is the responsibility of the caller to call MarkDormant immediately.

If info cannot be found or created, nullptr will be returned.

◆ FlushDormantActors()

void FNetworkObjectList::FlushDormantActors ( UNetConnection *const  Connection,
const FName PackageName 
)

Marks any actors in the given package/level active if they were fully dormant or dormant for the passed in connection

◆ ForceActorRelevantNextUpdate()

void FNetworkObjectList::ForceActorRelevantNextUpdate ( AActor *const  Actor,
UNetDriver NetDriver 
)

Force this actor to be relevant for at least one update

◆ GetActiveObjects()

const FNetworkObjectSet & FNetworkObjectList::GetActiveObjects ( ) const
inline

Returns a const reference to the active set of tracked actors.

◆ GetAllObjects()

const FNetworkObjectSet & FNetworkObjectList::GetAllObjects ( ) const
inline

Returns a const reference to the entire set of tracked actors.

◆ GetDormantObjectsOnAllConnections()

const FNetworkObjectSet & FNetworkObjectList::GetDormantObjectsOnAllConnections ( ) const
inline

Returns a const reference to the entire set of dormant actors.

◆ GetNumDormantActorsForConnection()

int32 FNetworkObjectList::GetNumDormantActorsForConnection ( UNetConnection *const  Connection) const

◆ HandleConnectionAdded()

void FNetworkObjectList::HandleConnectionAdded ( )

Does the necessary house keeping when a new connection is added When a new connection is added, we must add all objects back to the active list so the new connection will process it Once the objects is dormant on that connection, it will then be removed from the active list again

◆ MarkActive()

bool FNetworkObjectList::MarkActive ( AActor *const  Actor,
UNetConnection *const  Connection,
UNetDriver NetDriver 
)

Marks this object as active for the passed in connection

◆ MarkDirtyForReplay()

void FNetworkObjectList::MarkDirtyForReplay ( AActor *const  Actor)

Marks this object dirty for replays using delta checkpoints

◆ MarkDormant()

void FNetworkObjectList::MarkDormant ( AActor *const  Actor,
UNetConnection *const  Connection,
const int32  NumConnections,
UNetDriver NetDriver 
)

Marks this object as dormant for the passed in connection

◆ OnActorDestroyed()

void FNetworkObjectList::OnActorDestroyed ( AActor DestroyedActor)

Called when the netdriver gets notified that an actor is destroyed

◆ OnActorIsTraveling()

void FNetworkObjectList::OnActorIsTraveling ( AActor TravelingAtor)

Called when a replicated actor is about to be carried from one world to another

◆ OnPostSeamlessTravel()

void FNetworkObjectList::OnPostSeamlessTravel ( )

Called when seamless traveling is almost done just before we initialize the new world

◆ Remove()

void FNetworkObjectList::Remove ( AActor *const  Actor)

Removes actor from the internal list, and any cleanup that is necessary (i.e. resetting dormancy state)

◆ Reset()

void FNetworkObjectList::Reset ( )

◆ ResetDormancyState()

void FNetworkObjectList::ResetDormancyState ( )

Clears all state related to dormancy

◆ ResetReplayDirtyTracking()

void FNetworkObjectList::ResetReplayDirtyTracking ( )

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