Navigation
API > API/Runtime > API/Runtime/NetCore
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.
| Name | FGuidReferences |
| Type | class |
| Header File | /Engine/Source/Runtime/Net/Core/Public/Net/Core/Misc/GuidReferences.h |
| Include Path | #include "Net/Core/Misc/GuidReferences.h" |
Syntax
class FGuidReferences
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGuidReferences
(
const FGuidReferences& Other |
Net/Core/Misc/GuidReferences.h | ||
FGuidReferences
(
FGuidReferences&& Other |
Net/Core/Misc/GuidReferences.h | ||
FGuidReferences
(
FGuidReferencesMap* InArray, |
Net/Core/Misc/GuidReferences.h | ||
FGuidReferences
(
FBitReader& InReader, |
Net/Core/Misc/GuidReferences.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FGuidReferences() |
Net/Core/Misc/GuidReferences.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Array | FGuidReferencesMap * | 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. | Net/Core/Misc/GuidReferences.h | |
| Buffer | TArray< uint8 > | A copy of the last network data read related to this GUID Reference. | Net/Core/Misc/GuidReferences.h | |
| CmdIndex | int32 | The Property Command index of the actual property that references the GUID. | Net/Core/Misc/GuidReferences.h | |
| MappedDynamicGUIDs | TSet< FNetworkGUID > | GUIDs for dynamically spawned objects that have already been created. | Net/Core/Misc/GuidReferences.h | |
| NumBufferBits | int32 | Net/Core/Misc/GuidReferences.h | ||
| ParentIndex | int32 | The Property Command index of the top level property that references the GUID. | Net/Core/Misc/GuidReferences.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PackageMap | TWeakObjectPtr< UPackageMap > | Stored PackageMap reference to update with tracked UnmappedGUIDs. | Net/Core/Misc/GuidReferences.h | |
| UnmappedGUIDs | TSet< FNetworkGUID > | GUIDs for objects that haven't been loaded / created yet. | Net/Core/Misc/GuidReferences.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddUnmappedGUID
(
FNetworkGUID InGUID |
Starts tracking InGUID if not already and calls UPackageMap::AddUnmappedNetGUIDReference if bRemapStableSubobjects is enabled. | Net/Core/Misc/GuidReferences.h | |
void CountBytes
(
FArchive& Ar |
Net/Core/Misc/GuidReferences.h | ||
const TSet< FNetworkGUID > & GetUnmappedGUIDs() |
Get the set of GUIDs for objects that haven't been loaded / created yet. | Net/Core/Misc/GuidReferences.h | |
void RemoveUnmappedGUID
(
FNetworkGUID InGUID |
Stops tracking a GUID and calls UPackageMap::RemoveUnmappedNetGUIDReference if bRemapStableSubobjects is enabled. | Net/Core/Misc/GuidReferences.h | |
bool UpdateUnmappedGUIDs
(
UPackageMap* InPackageMap, |
Called by FRepLayout to update GUID tracking when updating unmapped objects. | Net/Core/Misc/GuidReferences.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGuidReferences & operator=
(
const FGuidReferences& Other |
Net/Core/Misc/GuidReferences.h | ||
FGuidReferences & operator=
(
FGuidReferences&& |
Net/Core/Misc/GuidReferences.h |