Skip to content

Commit 4b32172

Browse files
authored
Merge branch 'develop-3.x.x' into chore/enable-unified-hybrid-tests
2 parents 3f0a970 + d3da75c commit 4b32172

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)