Skip to content

Conversation

@tigran-sargsyan-w
Copy link

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

This comment was marked as spam.

@tigran-sargsyan-w

This comment was marked as spam.

@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
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.

@miwarnec
Copy link
Collaborator

miwarnec commented Jan 6, 2026

@MrGadget1024 up to you!

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