Skip to content

Commit ca9696b

Browse files
committed
Deprecate SetDebugSimulatorParameters on UTP1
1 parent 3093b22 commit ca9696b

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ public void SetConnectionData(NetworkEndpoint endPoint, NetworkEndpoint listenEn
671671
/// <param name="packetDelay">Packet delay in milliseconds.</param>
672672
/// <param name="packetJitter">Packet jitter in milliseconds.</param>
673673
/// <param name="dropRate">Packet drop percentage.</param>
674+
[Obsolete("SetDebugSimulatorParameters is no longer supported and has no effect.")]
674675
public void SetDebugSimulatorParameters(int packetDelay, int packetJitter, int dropRate)
675676
{
676677
if (m_Driver.IsCreated)

com.unity.netcode.gameobjects/Tests/Runtime/Metrics/PacketLossMetricsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ protected override void OnServerAndClientsCreated()
3030
{
3131
var clientTransport = (UnityTransport)m_ClientNetworkManagers[0].NetworkConfig.NetworkTransport;
3232
#if !UTP_TRANSPORT_2_0_ABOVE
33+
#pragma warning disable CS0618
3334
clientTransport.SetDebugSimulatorParameters(0, 0, m_PacketLossRate);
35+
#pragma warning restore CS0618
3436
#endif
3537

3638
// Determined through trial and error. With both UTP 1.2 and 2.0, this random seed

com.unity.netcode.gameobjects/Tests/Runtime/Transports/UnityTransportTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ public IEnumerator SendCompletesOnUnreliableSendQueueOverflow()
341341
}
342342

343343
#if !UTP_TRANSPORT_2_0_ABOVE
344+
#pragma warning disable CS0618
344345
// Check that simulator parameters are effective. We only check with the drop rate, because
345346
// that's easy to check and we only really want to make sure the simulator parameters are
346347
// configured properly (the simulator pipeline stage is already well-tested in UTP).
@@ -395,6 +396,7 @@ public IEnumerator CurrentRttReportedCorrectly()
395396

396397
yield return null;
397398
}
399+
#pragma warning restore CS0618
398400
#endif
399401

400402
[UnityTest]

0 commit comments

Comments
 (0)