Skip to content

Conversation

@tigran-sargsyan-w
Copy link
Contributor

This PR improves the default NetworkPingDisplay overlay so that connection quality is immediately readable and consistent across enum changes.

Replaces the hard-to-parse “dash count” with:

  • Q: EXCELLENT [■■■■] / Q: ESTIMATING [····]
  • Auto-sizes the bar based on the ConnectionQuality enum (no magic numbers).
  • Keeps the change minimal: only tweaks inside OnGUI(), no public API changes.

Motivation
The previous UI showed quality as a growing number of dashes:Q: ----
This is ambiguous for players and non-obvious for developers (how many “-” is GOOD?). Explicit text + a fixed-length bar is a common visual language and improves usability without adding complexity. Especially when we work in Editor
Screenshot 2025-09-15 203006

What changed (high level)

  • Compute totalSegments from the enum: int totalSegments = Enum.GetValues(typeof(ConnectionQuality)).Length - 1;
  • Build a compact bar using filled/empty glyphs (■ / ·)(made also customizable) based on (int)quality.
  • Print Q: {STATUS} [{bar}] and keep RTT as before.

Before / After

Before:
Screenshot 2025-09-15 201324
Screenshot 2025-09-15 202500

After:
Screenshot 2025-09-15 200718
Screenshot 2025-09-15 202311

@MrGadget1024
Copy link
Collaborator

If we do this, the EXCELLENT should be shortened to GREAT so it doesn't rattle the UI so much. Alternatively, we could show the "unlit" bars so it would be obvious that there's always max 4 bars and only some are lit with color.

@tigran-sargsyan-w
Copy link
Contributor Author

tigran-sargsyan-w commented Sep 16, 2025

If we do this, the EXCELLENT should be shortened to GREAT so it doesn't rattle the UI so much. Alternatively, we could show the "unlit" bars so it would be obvious that there's always max 4 bars and only some are lit with color.

Well, in fact, I don't think it's worth replacing EXCELLENT with GREAT, but in principle it's also possible. Just so as not to change the code and so that there are fewer changes and dependencies. It's better to change only this script. Since many people probably use ConnectionQuality.EXCELLENT in their projects directly, and if you change the original version, it might cause more problems for the guys who use Mirror.

then what do you think about this option:
Screenshot 2025-09-16 121638
Screenshot 2025-09-16 121700
Screenshot 2025-09-16 121715
Screenshot 2025-09-16 121725

do you like this kind of visual?

@tigran-sargsyan-w
Copy link
Contributor Author

@miwarnec Hey, I’d appreciate it if you could take a look at my PR and approve it if everything looks good.

@miwarnec
Copy link
Collaborator

looks good, but seems to break on Unity 6 as per CI. could you try it there once please?

@tigran-sargsyan-w
Copy link
Contributor Author

looks good, but seems to break on Unity 6 as per CI. could you try it there once please?

Hi @miwarnec ,
I retested locally on Unity 6 — everything works as expected and matches the screenshots.
The CI failure seems unrelated to the code: the Unity 6 job can’t access repo secrets (Resource not accessible by integration, Missing Unity License File/Serial), so it never actually runs the build/tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants