Conversation
High Ping frequency and TimeSnapshotMessage are only needed when NT's are actively used in the game - Prevents TimeSnapshotMessage sending when no NT's - Uses 2s Ping frequency when no NT's - NetworkTime has a `static ulong activeNTs' - NTBase and NTHybrid increment / decrement via OnEnable / OnDisable - Tests updated to use DefaultPingInterval, now internal static instead of const Tested with PlayerTest, Basic, and Room examples - PlayerTest works as expected using all NT prefabs - Basic example has no NT's, works as expected with low noise - Room example only uses NT in Game scene, not in Online scene - Logging shows the higher msg traffic in Game scene only, not in Online scene (correct) - Logging shows the reduced msg traffic when in Online Scene, even when switching back to Online scene from Game scene
|
Why is |
A few reasons:
Basically, any component (NT, PredictedRB, future others) has to tell NetworkTime they're alive, so the rest of Mirror uses the correct timing and sends the required messages. |
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Assets/Mirror/Tests/Editor/NetworkConnection/NetworkConnectionToClientTests.cs
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (35.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #3979 +/- ##
==========================================
- Coverage 42.71% 42.68% -0.04%
==========================================
Files 150 150
Lines 14623 14639 +16
==========================================
+ Hits 6246 6248 +2
- Misses 8377 8391 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Fixes #3828
High Ping frequency and TimeSnapshotMessage are only needed when NT's / PredictedRB's are actively used in the game
static ulong highPingComponentsTested with PlayerTest, Basic, BilliardsPredicted, and Room examples