Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeNetworkStatsMonitor reports incorrect bandwidth stats when domain reload is disabled #3127

Open
CodeSmile-0000011110110111 opened this issue Nov 16, 2024 · 1 comment
Assignees
Labels
Investigating Issue is currently being investigated stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report

Comments

@CodeSmile-0000011110110111
Copy link

CodeSmile-0000011110110111 commented Nov 16, 2024

Description

I connect four players in MPPM. I spawn 100 constantly moving objects with a NetworkTransform that syncs the position and Y rotation at 20 Hz tick rate. I use Unity 6000.0.24 with NGO 2.0.0 and MPPM 1.3.1 on Win11.

Upon repeatedly entering playmode, the reported stats continue to deviate from the first run. These stats only reset when setting "Enter Play Mode Settings" to "Reload Domain" and restarting the editor.

Observation:

  • with domain reload disabled: every time I enter playmode, the host's upstream seems to roughly double compared to the last playmode session. The client's downstream values also increase accordingly. Example: first session the host's upstream is 120 Kb/s. Second time it's 240 Kb/s. Third time it's 350 Kb/s.
  • with domain & scene reload enabled, the same stats are reported every time I enter playmode

Note: I also have asset autorefresh disabled. Didn't test if this has any effect.

I suppose there are some static fields involved that are not being reset.

This means currently RuntimeNetworkStatsMonitor reports incorrect values if domain reload is disabled. Not knowing this and only performing a quick test here and there, this will lead to incorrect assessments and actions taken.

@CodeSmile-0000011110110111 CodeSmile-0000011110110111 added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Nov 16, 2024
@NoelStephensUnity
Copy link
Collaborator

This is a known issue with the RNSM and detecting when a new NetworkManager instance has been created and/or destroyed.
#3088 provided a mechanism to help with this. I will check when the next update for the Multiplayer Tools package will be and if that will include updates to RNSM.

@NoelStephensUnity NoelStephensUnity added the Investigating Issue is currently being investigated label Nov 18, 2024
@michalChrobot michalChrobot added stat:imported Status - Issue is tracked internally at Unity and removed stat:awaiting triage Status - Awaiting triage from the Netcode team. labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigating Issue is currently being investigated stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants