You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: Hide spammy & debug draw NetworkTransform behind define
- Moves debug draw & local-write warnings in NT behind a debug define
- Fixes warning message format
- Fixes teleport exception message
Future changes not addressed here:
- Debug draw should be via gizmos, not the current implementation
- Spammy log messages shouldn't be so spammy, and shouldn't be so expensive to detect
* fix: Test log verification workaround.
We have a test which verifies log output. Updated the test to match same parameters (that is, define guard and developer log level guard).
These tests need to be properly refactored post-1.0
* test: guard regex using in test file with NGO_TRANSFORM_DEBUG
Co-authored-by: Matt Walsh <[email protected]>
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Components/NetworkTransform.cs
+17-16Lines changed: 17 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -298,8 +298,6 @@ public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReade
298
298
privateintm_LastSentTick;
299
299
privateNetworkTransformStatem_LastSentState;
300
300
301
-
privateconststringk_NoAuthorityMessage="A local change to {dirtyField} without authority detected, reverting back to latest interpolated network state!";
302
-
303
301
304
302
/// <summary>
305
303
/// Tries updating the server authoritative transform, only if allowed.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformTests.cs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
usingSystem;
2
2
usingSystem.Collections;
3
+
#if NGO_TRANSFORM_DEBUG
3
4
usingSystem.Text.RegularExpressions;
5
+
#endif
4
6
usingUnity.Netcode.Components;
5
7
usingNUnit.Framework;
6
8
// using Unity.Netcode.Samples;
@@ -45,6 +47,13 @@ public override IEnumerator Setup()
45
47
}
46
48
});
47
49
50
+
#if NGO_TRANSFORM_DEBUG
51
+
// Log assert for writing without authority is a developer log...
52
+
// TODO: This is why monolithic test base classes and test helpers are an anti-pattern - this is part of an individual test case setup but is separated from the code verifying it!
0 commit comments