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

#include <WorldLocations.h>

Classes

struct  FWorldInfo
 

Public Member Functions

void Init (const FWorldLocationsInitParams &InitParams)
 
void PostSendUpdate ()
 
bool HasInfoForObject (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
FVector GetWorldLocation (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
float GetCullDistance (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
TOptional< FWorldLocations::FWorldInfoGetWorldInfo (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
void SetObjectInfo (UE::Net::Private::FInternalNetRefIndex ObjectIndex, const FVector &Location, float NetCullDistance)
 
void InitObjectInfoCache (UE::Net::Private::FInternalNetRefIndex ObjectIndex)
 
void RemoveObjectInfoCache (UE::Net::Private::FInternalNetRefIndex ObjectIndex)
 
void SetObjectRequiresFrequentWorldLocationUpdate (UE::Net::Private::FInternalNetRefIndex ObjectIndex, bool bRequiresFrequentUpdate)
 
bool GetObjectRequiresFrequentWorldLocationUpdate (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
bool SetCullDistanceOverride (UE::Net::Private::FInternalNetRefIndex ObjectIndex, float CullDistance)
 
bool ClearCullDistanceOverride (UE::Net::Private::FInternalNetRefIndex ObjectIndex)
 
bool HasCullDistanceOverride (UE::Net::Private::FInternalNetRefIndex ObjectIndex) const
 
const FNetBitArrayView GetObjectsRequiringFrequentWorldLocationUpdate () const
 
const FNetBitArrayView GetObjectsWithDirtyInfo () const
 
const FNetBitArrayView GetObjectsWithWorldInfo () const
 
void ResetObjectsWithDirtyInfo ()
 
void LockDirtyInfoList (bool bLock)
 
const FVectorGetWorldMinPos () const
 
const FVectorGetWorldMaxPos () const
 
FVector ClampPositionToBoundary (const FVector &Position) const
 
bool IsValidLocation (const FVector &Location) const
 
void OnMaxInternalNetRefIndexIncreased (UE::Net::Private::FInternalNetRefIndex NewMaxInternalIndex)
 

Member Function Documentation

◆ ClampPositionToBoundary()

FVector UE::Net::FWorldLocations::ClampPositionToBoundary ( const FVector Position) const
inline

Return a position clamped to the configured world boundary.

◆ ClearCullDistanceOverride()

bool UE::Net::FWorldLocations::ClearCullDistanceOverride ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex)

Remove the temporary net cull distance override and instead use the regular net cull distance Returns true if the object had registered to use the world location cache and had an override value previously set

◆ GetCullDistance()

float UE::Net::FWorldLocations::GetCullDistance ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Get the object's current cull distance.

◆ GetObjectRequiresFrequentWorldLocationUpdate()

bool UE::Net::FWorldLocations::GetObjectRequiresFrequentWorldLocationUpdate ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Returns whether an object requires frequent world location updates.

◆ GetObjectsRequiringFrequentWorldLocationUpdate()

const FNetBitArrayView UE::Net::FWorldLocations::GetObjectsRequiringFrequentWorldLocationUpdate ( ) const
inline

Returns the list of objects that need to check for a location change every frame

◆ GetObjectsWithDirtyInfo()

const FNetBitArrayView UE::Net::FWorldLocations::GetObjectsWithDirtyInfo ( ) const
inline

Returns the list of objects that changed world location or cull distance this frame

◆ GetObjectsWithWorldInfo()

const FNetBitArrayView UE::Net::FWorldLocations::GetObjectsWithWorldInfo ( ) const
inline

Returns the list of objects that registered world location information

◆ GetWorldInfo()

TOptional< FWorldLocations::FWorldInfo > UE::Net::FWorldLocations::GetWorldInfo ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Return the current stored world information of the given object, or NullOpt if the object did not register in the world location cache.

◆ GetWorldLocation()

FVector UE::Net::FWorldLocations::GetWorldLocation ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Returns the object's world location if it's valid or a zero vector if it's not.

◆ GetWorldMaxPos()

const FVector & UE::Net::FWorldLocations::GetWorldMaxPos ( ) const
inline

◆ GetWorldMinPos()

const FVector & UE::Net::FWorldLocations::GetWorldMinPos ( ) const
inline

Return the world boundaries (min and max position).

◆ HasCullDistanceOverride()

bool UE::Net::FWorldLocations::HasCullDistanceOverride ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Returns true if the object was set a cull distance override and is using it instead of his default cull distance value

◆ HasInfoForObject()

bool UE::Net::FWorldLocations::HasInfoForObject ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex) const
inline

Returns whether the object has a valid cached data or not.

◆ Init()

void UE::Net::FWorldLocations::Init ( const FWorldLocationsInitParams InitParams)

◆ InitObjectInfoCache()

void UE::Net::FWorldLocations::InitObjectInfoCache ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex)

Assign a world information cache to the replicated object

◆ IsValidLocation()

bool UE::Net::FWorldLocations::IsValidLocation ( const FVector Location) const
inline

Is the location without the configured Min/Max WorldPos

◆ LockDirtyInfoList()

void UE::Net::FWorldLocations::LockDirtyInfoList ( bool  bLock)

Debug tool to track when its legal to modify the DirtyInfo list.

◆ OnMaxInternalNetRefIndexIncreased()

void UE::Net::FWorldLocations::OnMaxInternalNetRefIndexIncreased ( UE::Net::Private::FInternalNetRefIndex  NewMaxInternalIndex)

◆ PostSendUpdate()

void UE::Net::FWorldLocations::PostSendUpdate ( )

◆ RemoveObjectInfoCache()

void UE::Net::FWorldLocations::RemoveObjectInfoCache ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex)

Remove the world information cache of the replicated object

◆ ResetObjectsWithDirtyInfo()

void UE::Net::FWorldLocations::ResetObjectsWithDirtyInfo ( )

Reset the list of objects that changed location or cull distance

◆ SetCullDistanceOverride()

bool UE::Net::FWorldLocations::SetCullDistanceOverride ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex,
float  CullDistance 
)

Add a temporary net cull distance that will have priority over the regular net cull distance. Returns true if the object had registered to use the world location cache and can store the override.

◆ SetObjectInfo()

void UE::Net::FWorldLocations::SetObjectInfo ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex,
const FVector Location,
float  NetCullDistance 
)

Set the mandatory info of a replicated root object

◆ SetObjectRequiresFrequentWorldLocationUpdate()

void UE::Net::FWorldLocations::SetObjectRequiresFrequentWorldLocationUpdate ( UE::Net::Private::FInternalNetRefIndex  ObjectIndex,
bool  bRequiresFrequentUpdate 
)
inline

Objects are not necessarily marked as dirty just because they're moving, such as objects attached to other objects. If such objects are spatially filtered they need to update their world locations in order for replication to work as expected. Use SetObjectRequiresFrequentWorldLocationUpdate to force frequent world location update on an object.


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