Skip to content

Commit 1bbdfdb

Browse files
Merge branch 'develop-3.x.x' into fix/half-float-delta-position-dither-up-port
2 parents 6100893 + d3da75c commit 1bbdfdb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,14 @@ public NetworkSettings GetDefaultNetworkSettings()
520520
receiveQueueCapacity: m_MaxPacketQueueSize,
521521
heartbeatTimeoutMS: m_HeartbeatTimeoutMS);
522522

523+
// Disable PMTU discovery if using DA, leave it at its default otherwise.
524+
if (OnCurrentTopology() == NetworkTopologyTypes.DistributedAuthority)
525+
{
526+
var config = settings.GetNetworkConfigParameters();
527+
config.performPathMtuDiscovery = false;
528+
settings.AddRawParameterStruct(ref config);
529+
}
530+
523531
// Configure Relay if in use.
524532
if (m_ProtocolType == ProtocolType.RelayUnityTransport)
525533
{

0 commit comments

Comments
 (0)