FGuidReferences

References to Objects (including Actors, Components, etc.) are replicated as NetGUIDs, since the literal memory pointers will be different across game instances.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Net/GuidReferences.h

Include

#include "Net/GuidReferences.h"

Syntax

class FGuidReferences

Remarks

References to Objects (including Actors, Components, etc.) are replicated as NetGUIDs, since the literal memory pointers will be different across game instances. In these cases, actual replicated data for the Object will be handled elsewhere (either on its own Actor channel, or on its Owning Actor's channel, as a replicated subobject).

As Objects are replicated and received, these GUID References will become "mapped", and the networking system will update the corresponding properties with pointers to the appropriate objects.

As Objects are destroyed (due to game play, actor channels closing, relevancy, etc.), GUID References will be "unmapped", and their corresponding properties will nulled out.

The process of Mapping and Unmapping can happen numerous times for the same object (e.g., if an Actor goes in and out of relevancy repeatedly).

This class helps manage those references for specific replicated properties. A FGuidReferences instance will be created for each Replicated Property that is a reference to an object.

Guid References may also be nested in properties (like dynamic arrays), so we'll recursively track those as well.

Variables

Name Description

Public variable

FGuidReferences...

 

Array

If this FGuidReferences instance is owned by an Array Property that contains nested GUID References, then this will be a valid FGuidReferencesMap containing the nested FGuidReferences.

Public variable

TArray< uint8 >

 

Buffer

A copy of the last network data read related to this GUID Reference.

Public variable

int32

 

CmdIndex

The Property Command index of the actual property that references the GUID.

Public variable

TSet< FNetworkG...

 

MappedDynamicGUIDs

GUIDs for dynamically spawned objects that have already been created.

Public variable

int32

 

NumBufferBits

Public variable

int32

 

ParentIndex

The Property Command index of the top level property that references the GUID.

Public variable

TSet< FNetworkG...

 

UnmappedGUIDs

GUIDs for objects that haven't been loaded / created yet.

Constructors

Name Description

Public function

FGuidReferences()

Public function

FGuidReferences

(
    FGuidReferencesMap* InArray,
    const int32 InParentIndex,
    const int32 InCmdIndex
)

Public function

FGuidReferences

(
    FBitReader& InReader,
    FBitReaderMark& InMark,
    const TSet< FNetworkGUID >& InUnma...,
    const TSet< FNetworkGUID >& InMapp...,
    const int32 InParentIndex,
    const int32 InCmdIndex
)

Destructors

Name Description

Public function

~FGuidReferences()

Functions

Name Description

Public function Const

void

 

CountBytes

(
    FArchive& Ar
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss