From d06c208d2f44a44455a1e9a154ff77311e044020 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 31 Mar 2025 15:52:03 +0200 Subject: [PATCH 1/6] Updated codeowners file --- .github/CODEOWNERS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a7cd830adc..0a3e522353 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,10 +2,10 @@ # Order is important; the last matching pattern takes the most precedence. * @Unity-Technologies/multiplayer-sdk -*.asmdef @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -package.json @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -AssemblyInfo.cs @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -.editorconfig @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -.gitignore @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -.github/ @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM -.yamato/ @miniwolf @NoelStephensUnity @fluong6 @michalChrobot @EmandM +*.asmdef @NoelStephensUnity @EmandM @netcode-qa +package.json @NoelStephensUnity @EmandM @netcode-qa +AssemblyInfo.cs @NoelStephensUnity @EmandM @netcode-qa +.editorconfig @NoelStephensUnity @EmandM @netcode-qa +.gitignore @NoelStephensUnity @EmandM @netcode-qa +.github/ @NoelStephensUnity @EmandM @netcode-qa +.yamato/ @NoelStephensUnity @EmandM @netcode-qa From b505571ade2c40dde4d3f50b2ea108cfcb8ea2bf Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 31 Mar 2025 16:25:09 +0200 Subject: [PATCH 2/6] Corrected group name --- .github/CODEOWNERS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0a3e522353..905922d636 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,10 +2,10 @@ # Order is important; the last matching pattern takes the most precedence. * @Unity-Technologies/multiplayer-sdk -*.asmdef @NoelStephensUnity @EmandM @netcode-qa -package.json @NoelStephensUnity @EmandM @netcode-qa -AssemblyInfo.cs @NoelStephensUnity @EmandM @netcode-qa -.editorconfig @NoelStephensUnity @EmandM @netcode-qa -.gitignore @NoelStephensUnity @EmandM @netcode-qa -.github/ @NoelStephensUnity @EmandM @netcode-qa -.yamato/ @NoelStephensUnity @EmandM @netcode-qa +*.asmdef @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +package.json @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +AssemblyInfo.cs @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +.editorconfig @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +.gitignore @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +.github/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +.yamato/ @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa From 1c9cb054d88304c5c6a0dfd6f1b8d6e888e4313d Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Mon, 31 Mar 2025 16:31:55 -0500 Subject: [PATCH 3/6] Test Adding additional debug information for when CorrectAmountTicksTest fails. --- .../Runtime/Timing/NetworkTimeSystemTests.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs index 992dbb2293..627fe8776a 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs @@ -62,7 +62,7 @@ public IEnumerator PlayerLoopTimeTest_WithDifferentTimeScale([Values(0.0f, 0.1f, public IEnumerator CorrectAmountTicksTest() { NetworkTickSystem tickSystem = NetworkManager.Singleton.NetworkTickSystem; - float delta = tickSystem.LocalTime.FixedDeltaTime; + double delta = tickSystem.LocalTime.FixedDeltaTimeAsDouble; int previous_localTickCalculated = 0; int previous_serverTickCalculated = 0; @@ -70,27 +70,26 @@ public IEnumerator CorrectAmountTicksTest() { yield return null; - var tickCalculated = tickSystem.LocalTime.Time / delta; - previous_localTickCalculated = (int)tickCalculated; + var localTickCalculated = tickSystem.LocalTime.Time / delta; + previous_localTickCalculated = (int)localTickCalculated; // This check is needed due to double division imprecision of large numbers - if ((tickCalculated - previous_localTickCalculated) >= 0.999999999999) + if ((localTickCalculated - previous_localTickCalculated) >= 0.999999999999) { previous_localTickCalculated++; } - - tickCalculated = NetworkManager.Singleton.ServerTime.Time / delta; - previous_serverTickCalculated = (int)tickCalculated; + var serverTickCalculated = tickSystem.ServerTime.Time / delta; + previous_serverTickCalculated = (int)serverTickCalculated; // This check is needed due to double division imprecision of large numbers - if ((tickCalculated - previous_serverTickCalculated) >= 0.999999999999) + if ((serverTickCalculated - previous_serverTickCalculated) >= 0.999999999999) { previous_serverTickCalculated++; } - Assert.AreEqual(previous_localTickCalculated, NetworkManager.Singleton.LocalTime.Tick, $"Calculated local tick {previous_localTickCalculated} does not match local tick {NetworkManager.Singleton.LocalTime.Tick}!"); - Assert.AreEqual(previous_serverTickCalculated, NetworkManager.Singleton.ServerTime.Tick, $"Calculated server tick {previous_serverTickCalculated} does not match server tick {NetworkManager.Singleton.ServerTime.Tick}!"); + Assert.AreEqual(previous_localTickCalculated, NetworkManager.Singleton.LocalTime.Tick, $"Calculated local tick {previous_localTickCalculated} does not match local tick {NetworkManager.Singleton.LocalTime.Tick}!]n Local Tick-Calc: {localTickCalculated} LocalTime: {tickSystem.LocalTime.Time} | Server Tick-Calc: {serverTickCalculated} ServerTime: {tickSystem.ServerTime.Time} | TickDelta: {delta}"); + Assert.AreEqual(previous_serverTickCalculated, NetworkManager.Singleton.ServerTime.Tick, $"Calculated server tick {previous_serverTickCalculated} does not match server tick {NetworkManager.Singleton.ServerTime.Tick}!\n Local Tick-Calc: {localTickCalculated} LocalTime: {tickSystem.LocalTime.Time} | Server Tick-Calc: {serverTickCalculated} ServerTime: {tickSystem.ServerTime.Time} | TickDelta: {delta}"); Assert.AreEqual((float)NetworkManager.Singleton.LocalTime.Time, (float)NetworkManager.Singleton.ServerTime.Time, $"Local time {(float)NetworkManager.Singleton.LocalTime.Time} is not approximately server time {(float)NetworkManager.Singleton.ServerTime.Time}!", FloatComparer.s_ComparerWithDefaultTolerance); } } From 0346cc4f0bbe4e965c197227c95d60854026d70b Mon Sep 17 00:00:00 2001 From: NoelStephensUnity Date: Mon, 31 Mar 2025 16:51:39 -0500 Subject: [PATCH 4/6] Revert "Test" This reverts commit 1c9cb054d88304c5c6a0dfd6f1b8d6e888e4313d. --- .../Runtime/Timing/NetworkTimeSystemTests.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs b/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs index 627fe8776a..992dbb2293 100644 --- a/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs +++ b/com.unity.netcode.gameobjects/Tests/Runtime/Timing/NetworkTimeSystemTests.cs @@ -62,7 +62,7 @@ public IEnumerator PlayerLoopTimeTest_WithDifferentTimeScale([Values(0.0f, 0.1f, public IEnumerator CorrectAmountTicksTest() { NetworkTickSystem tickSystem = NetworkManager.Singleton.NetworkTickSystem; - double delta = tickSystem.LocalTime.FixedDeltaTimeAsDouble; + float delta = tickSystem.LocalTime.FixedDeltaTime; int previous_localTickCalculated = 0; int previous_serverTickCalculated = 0; @@ -70,26 +70,27 @@ public IEnumerator CorrectAmountTicksTest() { yield return null; - var localTickCalculated = tickSystem.LocalTime.Time / delta; - previous_localTickCalculated = (int)localTickCalculated; + var tickCalculated = tickSystem.LocalTime.Time / delta; + previous_localTickCalculated = (int)tickCalculated; // This check is needed due to double division imprecision of large numbers - if ((localTickCalculated - previous_localTickCalculated) >= 0.999999999999) + if ((tickCalculated - previous_localTickCalculated) >= 0.999999999999) { previous_localTickCalculated++; } - var serverTickCalculated = tickSystem.ServerTime.Time / delta; - previous_serverTickCalculated = (int)serverTickCalculated; + + tickCalculated = NetworkManager.Singleton.ServerTime.Time / delta; + previous_serverTickCalculated = (int)tickCalculated; // This check is needed due to double division imprecision of large numbers - if ((serverTickCalculated - previous_serverTickCalculated) >= 0.999999999999) + if ((tickCalculated - previous_serverTickCalculated) >= 0.999999999999) { previous_serverTickCalculated++; } - Assert.AreEqual(previous_localTickCalculated, NetworkManager.Singleton.LocalTime.Tick, $"Calculated local tick {previous_localTickCalculated} does not match local tick {NetworkManager.Singleton.LocalTime.Tick}!]n Local Tick-Calc: {localTickCalculated} LocalTime: {tickSystem.LocalTime.Time} | Server Tick-Calc: {serverTickCalculated} ServerTime: {tickSystem.ServerTime.Time} | TickDelta: {delta}"); - Assert.AreEqual(previous_serverTickCalculated, NetworkManager.Singleton.ServerTime.Tick, $"Calculated server tick {previous_serverTickCalculated} does not match server tick {NetworkManager.Singleton.ServerTime.Tick}!\n Local Tick-Calc: {localTickCalculated} LocalTime: {tickSystem.LocalTime.Time} | Server Tick-Calc: {serverTickCalculated} ServerTime: {tickSystem.ServerTime.Time} | TickDelta: {delta}"); + Assert.AreEqual(previous_localTickCalculated, NetworkManager.Singleton.LocalTime.Tick, $"Calculated local tick {previous_localTickCalculated} does not match local tick {NetworkManager.Singleton.LocalTime.Tick}!"); + Assert.AreEqual(previous_serverTickCalculated, NetworkManager.Singleton.ServerTime.Tick, $"Calculated server tick {previous_serverTickCalculated} does not match server tick {NetworkManager.Singleton.ServerTime.Tick}!"); Assert.AreEqual((float)NetworkManager.Singleton.LocalTime.Time, (float)NetworkManager.Singleton.ServerTime.Time, $"Local time {(float)NetworkManager.Singleton.LocalTime.Time} is not approximately server time {(float)NetworkManager.Singleton.ServerTime.Time}!", FloatComparer.s_ComparerWithDefaultTolerance); } } From 2d1c529ac22856d0ca2a54c63d865df25372aab2 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Tue, 1 Apr 2025 10:33:54 +0200 Subject: [PATCH 5/6] Test name change --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 905922d636..9765f3f7d0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ # Order is important; the last matching pattern takes the most precedence. * @Unity-Technologies/multiplayer-sdk -*.asmdef @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa +*.asmdef @NoelStephensUnity @EmandM @netcode-qa package.json @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa AssemblyInfo.cs @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa .editorconfig @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa From 39479c6edee660e4128b7da0969d6b54463d7715 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Tue, 1 Apr 2025 10:37:21 +0200 Subject: [PATCH 6/6] Revert "Test name change" This reverts commit 2d1c529ac22856d0ca2a54c63d865df25372aab2. --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9765f3f7d0..905922d636 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,7 +2,7 @@ # Order is important; the last matching pattern takes the most precedence. * @Unity-Technologies/multiplayer-sdk -*.asmdef @NoelStephensUnity @EmandM @netcode-qa +*.asmdef @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa package.json @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa AssemblyInfo.cs @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa .editorconfig @NoelStephensUnity @EmandM @Unity-Technologies/netcode-qa