Class UnityDiagnosticsOverlayComponent
On-screen diagnostics HUD for play mode: shows frame rate, time scale, the current/previous
GameMode and pause state, and the number of joined players — a designer-facing "what is the game
doing right now?" panel that answers the most common "why isn't this working?" questions without the
Console.
Namespace: Serenity.GameMode.Infrastructure.Components
Assembly: Serenity.UnityGameMode.Infrastructure.dll
Syntax
public class UnityDiagnosticsOverlayComponent : MonoBehaviour
Remarks
Self-contained: it only reads through service interfaces (IGameModeService via ServiceLocatorBridge) and the Input System, and degrades to "n/a" when a service isn't up yet. Toggle it from the inspector, with the Serenity.GameMode.Infrastructure.Components.UnityDiagnosticsOverlayComponent.toggleKey, or no-code by wiring Toggle()/Show()/Hide() to a UnityEvent or input action. It hides itself in non-development player builds unless Serenity.GameMode.Infrastructure.Components.UnityDiagnosticsOverlayComponent.showInBuilds is enabled, so it cannot leak into release.
Constructors
UnityDiagnosticsOverlayComponent()
Declaration
public UnityDiagnosticsOverlayComponent()
Methods
Hide()
Hides the overlay.
Declaration
public void Hide()
Show()
Shows the overlay.
Declaration
public void Show()
Toggle()
Toggles the overlay's visibility.
Declaration
public void Toggle()