Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/ActorChannel.h |
Include |
#include "Engine/ActorChannel.h" |
class UActorChannel : public UChannel
A channel for exchanging actor and its subobject's properties and RPCs.
ActorChannel manages the creation and lifetime of a replicated actor. Actual replication of properties and RPCs actually happens in FObjectReplicator now (see DataReplication.h).
An ActorChannel bunch looks like this:
+-------------------+------------------------------------------------------------------------+ | SpawnInfo | (Spawn Info) Initial bunch only | | -Actor Class | -Created by ActorChannel | | -Spawn Loc/Rot | | | NetGUID assigns | | | -Actor NetGUID | | | -Component NetGUIDs | | +-------------------+------------------------------------------------------------------------+ | | | +-------------------+------------------------------------------------------------------------+ | NetGUID ObjRef | (Content chunks) x number of replicating objects (Actor + any components) | | | -Each chunk created by its own FObjectReplicator instance. | +-------------------+------------------------------------------------------------------------+ | | |
Properties...
RPCs...
+-------------------+------------------------------------------------------------------------+ | </End> | | +-------------------+------------------------------------------------------------------------+
Name | Description | ||
---|---|---|---|
|
TObjectPtr< AAc... |
Actor |
Variables. |
|
ActorNetGUID |
||
|
TSharedPtr< FOb... |
ActorReplicator |
|
|
bBlockChannelFailure |
Whether or not to block sending of NMT_ActorChannelFailure (for NetcodeUnitTest) |
|
|
uint32: 1 |
bClearRecentActorRefs |
Whether we should nullptr references to this channel's Actor in other channels' Recent data when this channel is closed set to false in cases where the Actor can't become relevant again (e.g. destruction) as it's unnecessary in that case |
|
uint32: 1 |
bForceCompareProperties |
|
|
bHoldQueuedExportBunchesAndGUIDs |
||
|
uint32: 1 |
bIsReplicatingActor |
|
|
CreateSubObjects |
||
|
float |
CustomTimeDilation |
|
|
double |
LastUpdateTime |
|
|
PendingGuidResolves |
||
|
PendingObjKeys |
Keys pending in this bunch. |
|
|
QueuedBunches |
Async networking loading support state. |
|
|
double |
QueuedBunchStartTime |
|
|
QueuedCloseReason |
||
|
QueuedExportBunches |
||
|
QueuedMustBeMappedGuidsInLastBunch |
||
|
double |
RelevantTime |
Variables. |
|
ReplicationMap |
||
|
uint32: 1 |
SpawnAcked |
|
|
SubobjectNakMap |
Maps packetId to keys in Subobject. |
|
|
SubobjectRepKeyMap |
Maps ObjID to the current RepKey. |
Name | Description | |
---|---|---|
|
UActorChannel ( |
Default constructor |
Name | Description | |
---|---|---|
|
~UActorChannel() |
Name | Description | ||
---|---|---|---|
|
AddReferencedObjects ( |
||
|
CleanupReplicators ( |
Cleans up replicators and clears references to the actor class this channel was associated with. |
|
|
TSharedRef< ... |
CreateReplicator |
Creates a new object replicator. |
|
DestroyActorAndComponents() |
||
|
TSharedRef< ... |
FindOrCreateReplicator |
Convenience method for finding a replicator, and creating one if necessary, all at once. |
|
TSharedRef< ... |
FindReplicator |
Attempts to find a valid, non-dormant replicator for the given object. |
|
AActor * |
GetActor() |
UActorChannel interface and accessors. |
|
FObjectRepli... |
GetActorReplicationData() |
Returns the replicator for the actor associated with this channel. Guaranteed to exist. |
|
FNetFieldExp... |
GetNetFieldExportGroupForClassNetCache ( |
Finds the net field export group for a class net cache, if not found, creates one |
|
FNetFieldExp... |
GetOrCreateNetFieldExportGroupForClassNetCache ( |
Finds (or creates) the net field export group for a class net cache, if not found, creates one |
|
GetSkipRoleSwap() |
||
|
KeyNeedsToReplicate |
Returns true if the given ObjID is not up to date with RepKey this implicitly 'writes' the RepKey to the current out bunch. |
|
|
MoveMappedObjectToUnmapped ( |
Unmap all references to this object, so that if later we receive this object again, we can remap the original references |
|
|
NotifyActorChannelOpen |
||
|
ObjectHasReplicator ( |
||
|
PrepareForRemoteFunction ( |
If not queueing the RPC, prepare the channel for replicating the call. |
|
|
ProcessBunch ( |
||
|
ProcessQueuedBunches() |
||
|
QueueRemoteFunctionBunch |
Queue a function bunch for this channel to be sent on the next property update. |
|
|
UObject *... |
ReadContentBlockHeader |
Reads the header of the content block and instantiates the subobject if necessary |
|
UObject *... |
ReadContentBlockPayload ( |
Reads content block header and payload |
|
ReadFieldHeaderAndPayload ( |
Reads property/function header and data blob from network stream |
|
|
ReplicateActor() |
Replicate this channel's actor differences. |
|
|
ReplicateSubobject ( |
Subobject Replication state |
|
|
ReplicateSubobjectCustom ( |
Custom implementation for ReplicateSubobject when RepFlags.bUseCustomSubobjectReplication is true |
|
|
ReplicateSubobjectList ( |
Utility template for replicating list of replicated subobjects |
|
|
SetChannelActor ( |
Set this channel's actor to the given actor. |
|
|
SetSkipRoleSwap ( |
||
|
WriteContentBlockForSubObjectDelete ( |
Writes the header for a content block specifically for deleting sub-objects |
|
|
WriteContentBlockHeader ( |
Writes the header for a content block of properties / RPCs for the given object (either the actor a subobject of the actor) |
|
|
WriteContentBlockPayload ( |
Writes header and payload of content block |
|
|
WriteFieldHeaderAndPayload ( |
Writes property/function header and data blob to network stream |
Name | Description | ||
---|---|---|---|
|
AddedToChannelPool() |
Notification that this channel has been placed in a channel pool and needs to reset to its original state so it can be used again like a new channel |
|
|
AppendExportBunches |
Append any export bunches |
|
|
AppendMustBeMappedGuids ( |
Append any "must be mapped" guids to front of bunch. |
|
|
BecomeDormant() |
Closes the actor channel but with a 'dormant' flag set so it can be reopened |
|
|
CanStopTicking() |
Return true to indicate that this channel no longer needs to Tick() every frame. |
|
|
CleanUp ( |
Cleans up channel structures and nulls references to the channel |
|
|
Close ( |
Close the base channel. Returns how many bits were written to the send buffer |
|
|
Describe() |
Describe the channel. |
|
|
Init ( |
UChannel interface. |
|
|
ReadyForDormancy ( |
Returns true if channel is ready to go dormant (e.g., all outstanding property updates have been ACK'd) |
|
|
ReceivedBunch ( |
Handle an incoming bunch. |
|
|
ReceivedNak ( |
Negative acknowledgment processing. |
|
|
SetClosingFlag() |
Set the closing flag. |
|
|
StartBecomingDormant() |
Puts the channel in a state to start becoming dormant. |
|
|
Tick() |
Handle time passing on this channel. |
Name |
Description |
|
---|---|---|
|
FPacketRepKeyInfo |
Name |
Description |
---|---|
ClassNetCacheSuffix |
|
SubobjectRepKeyBufferSize |
Static size for SubobjectRepKeyMap. Allows us to resuse arrays and avoid dyanmic memory allocations. |
Name | Description | ||
---|---|---|---|
|
SetChannelActorForDestroy ( |
Use UNetworkDriver::SendDestructionInfo instead. |