Navigation
API > API/Plugins > API/Plugins/ReplicationGraph > API/Plugins/ReplicationGraph/FGlobalActorReplicationInfoMap
Description
AddDependentActor makes a dependent actor (the child) considered for replication whenever the parent actor is replicated to a client. When the parent is replicated, the child actor will be also replicated even if it is outside it's net cull distance. The child will NOT be replicated if it has no data to send or the net update frequency is too quick since the last netupdate. Note that this link is one way only, meaning if a child replicates by itself it will not force it's parents to be replicated at the same time. When setting a dependent link, it is the caller's responsibility to remove the dependency if one of the actor gets destroyed.
| Name | AddDependentActor |
| Type | function |
| Header File | /Engine/Plugins/Runtime/ReplicationGraph/Source/Public/ReplicationGraphTypes.h |
| Include Path | #include "ReplicationGraphTypes.h" |
| Source | /Engine/Plugins/Runtime/ReplicationGraph/Source/Private/ReplicationGraphTypes.cpp |
void AddDependentActor
(
AActor * Parent,
AActor * Child,
FGlobalActorReplicationInfoMap::EWarnFlag WarnFlag
)
Parameters
| Name | Remarks |
|---|---|
| Parent | Actor that will try to also replicate the child. |
| Child | The actor that we will try to replicate when the parent actor is replicated. |
| WarnFlag | Set a flag to trigger an ensure and detect when two actors get set dependent multiple times. |