/** Describes if an actor can enter a low network bandwidth dormant mode */
UENUM(BlueprintType)
enum ENetDormancy
{
/** This actor can never go network dormant. */
DORM_Never UMETA(DisplayName = "Never"),
/** This actor can go dormant, but is not currently dormant. Game code will tell it when it go dormant. */
DORM_Awake UMETA(DisplayName = "Awake"),
/** This actor wants to go fully dormant for all connections. */
DORM_DormantAll UMETA(DisplayName = "Dormant All"),
/** This actor may want to go dormant for some connections, GetNetDormancy() will be called to find out which. */
DORM_DormantPartial UMETA(DisplayName = "Dormant Partial"),
/** This actor is initially dormant for all connection if it was placed in map. */
DORM_Initial UMETA(DisplayName = "Initial"),
DORM_MAX UMETA(Hidden),
};
NetDormancy는 네트워크 휴면 여부를 결정하며 설정에 따라 액터의 프로퍼티 리플리케이션 여부를 조절할 수 있다. 즉, 액터가 휴면(Dormant) 상태인 경우 프로퍼티 리플리케이션이 수행되지 않는다고 이해하면 된다.
휴면 상태인 액터의 프로퍼티를 리플리케이션 하고 싶은 경우, FlushNetDormancy를 통해 휴면 상태를 유지하면서 호출 프레임에만 리플리케이션을 수행하도록 하거나, DROM_Never 혹은 DORM_Awake로 NetDormancy를 변경하여 리플리케이션이 지속적으로 수행되도록 할 수 있다.
NetDormancy는 서버에서 설정한 것만 유효하다.
Multicast RPC를 수행하는 경우, FlushNetDormancy가 강제적으로 호출된다.
NetDormacy 설정은 네트워크 최적화 그 중에서도 엑터의 프로퍼티 리플리케이션에 대한 최적화를 위한 것이다. 액터들 중에는 시시각각 프로퍼티 리플리케이션이 필요한 경우도 있지만 특정 이벤트가 발생할 때마다 리플리케이션이 수행되어도 무관한 액터들도 존재한다. 예를들어 파괴 가능한 나무를 만든다고 할 때, 이 액터는 평소에는 휴면 상태로 있다가 공격을 받았을 때만 FlushNetDormancy를 통해 체력을 리플리케이션 받는 식으로 최적화를 수행할 수 있다.
https://youtu.be/18LbGKf6QQw
https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/ENetDormancy/