text
stringlengths 0
17.2k
|
---|
When using the Replication Graph, dormancy should operate the same as when using the default NetDriver, so project code can set actors as dormant/awake and call AActor::FlushNetDormancy as normal. Even if a node returns a dormant actor when gathering its actor list, UReplicationGraph::ReplicateActorListsForConnections_Default still skips replicating these actors. |
Replication Graph nodes can include special handling for dormant actors. This can reduce the time and memory spent processing dormant actors for a node, as well as reduce the size of the node's gathered actors list. For example, the GridSpatialization2D node includes extra handling for dormant actors, treating them as static when they are dormant and dynamic when they are awake. This can be useful for actors that may sometimes move throughout the grid but can also remain stationary and dormant at other times. |
Enable the LogNetDormancy log category to get information in your logs on the dormancy status of actors. Increasing the verbosity of this category logs more detailed information, such as when dormancy is flushed for any actor. |
The table below contains several console variables related to network dormancy that you might find helpful: |
If this is enabled, the server attempts to reuse a dormant object's FObjectReplicator rather than destroying them when the actor goes dormant and recreating them when the object awakens. |
This functionality is no longer used internally. Keeping these replicators around increases server memory usage. For projects with a large number of dormant actors, this additional memory usage can be substantial. Reusing these replicators can also result in issues when replicating actors in sublevels. |
If this is enabled, print warnings to the log if actors are changing their replicated properties while dormant. |
Set to 1 to validate dormant actors only when they are awoken. |
Set to 2 to validate dormant actors every net update. |
Enabling dormancy validation causes dormant objects' replicators to be reused, as these are needed to compare the replicated properties while dormant. |
How to Use Network Dormancy |
Change an Actor's Network Dormancy |
Network Dormancy States |
Wake a Dormant Actor |
Dormancy with Blueprint Actors |
Dormancy and Replication Graph |
Debugging Network Dormancy |
Set Net Dormancy |
Flush Net Dormancy |
When to Use Wake Methods |
Logging |
Console Variables |
DORM_Never |
This actor never goes dormant. This is not enforced by the dormancy system. An actor marked as ENetDormancy::DORM_Never can be made dormant. |
DORM_Awake |
This actor is not dormant and is considered for replication. |
DORM_DormantPartial |
This actor is dormant on some connections, but not all. Use AActor::GetNetDormancy to determine which connections the actor is dormant for. We do not recommend that you use partial dormancy. Partial dormancy is planned for deprecation. |
DORM_Initial |
This actor is initially dormant on all connections. This should only be used by actors initially placed in the map. |
DORM_DormantAll |
This actor is dormant on all connections. |
net.DormancyEnable |
Use to fully enable or disable dormancy for all actors. This is useful for determining if a replication issue is related to dormancy or not. |
net.ReuseReplicatorsForDormantObjects |
If this is enabled, the server attempts to reuse a dormant object's FObjectReplicator rather than destroying them when the actor goes dormant and recreating them when the object awakens. This functionality is no longer used internally. Keeping these replicators around increases server memory usage. For projects with a large number of dormant actors, this additional memory usage can be substantial. Reusing these replicators can also result in issues when replicating actors in sublevels. |
net.DormancyValidate |
If this is enabled, print warnings to the log if actors are changing their replicated properties while dormant. Set to 1 to validate dormant actors only when they are awoken. Set to 2 to validate dormant actors every net update. Enabling dormancy validation causes dormant objects' replicators to be reused, as these are needed to compare the replicated properties while dormant. |
net.DormancyHysteresis |
The time (in seconds) the actor channel waits before becoming fully dormant. This is set to 0 by default, but increasing it might prevent churn in cases where actors are rapidly going in and out of dormancy. |
Net.RepGraph.LogNetDormancyDetails |
If this is enabled, more detailed log info is printed on how the replication graph is handling dormant actors. |
Net.RepGraph.DormantDynamicActorsDestruction |
If this is enabled, dormant actors are destroyed on the client when they go out of relevancy. See the Console Variables at the top of ReplicationGraph.cpp for more ways to configure this behavior. |
Code Example: |
NetDormancy = ENetDormancy::DORM_DormantAll; |
Remarks |
For more information about console variables in Unreal Engine, see theConsole Variablesdocumentation page. |
Ambient Zones |
Ambient Zones are an inexpensive interior/exterior ambient audio solution. Benefits of Ambient Zones include: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.