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
omnibus2211
approved these changes
Feb 11, 2025
|
Why is |
Collaborator
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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