Class UnityLeaderboardView
Runtime view that hosts a UnityLeaderboardPanel and is resolvable by Id from a menu transition or a ShowLeaderboardSignal (registered with the IViewRouter via UnityLeaderboardViewService). On Show() it fetches the configured slice of the board (Mode) and fills the panel; it also refreshes whenever a LeaderboardEntrySubmittedSignal for its board arrives while shown.
Namespace: Serenity.Leaderboard.Infrastructure.Views
Assembly: Serenity.UnityLeaderboard.Infrastructure.dll
Syntax
public sealed class UnityLeaderboardView : UnityViewBase
Remarks
Intentionally Unity-only beyond IViewBase: nothing outside the Leaderboard folder consumes
a leaderboard-specific member of this view (the registering service only calls
Show/Hide/Id/Guid, already on IViewBase). No dedicated
ILeaderboardView Business port for v1 — add one only if a future consumer needs
leaderboard-specific members across the Business boundary.
Constructors
UnityLeaderboardView()
Declaration
public UnityLeaderboardView()
Methods
Configure(UnityLeaderboardViewDefinition, UnityLeaderboardPanel, ILeaderboardService, ILeaderboardSettings, IEventDispatcherService, IViewRouter, IViewBrowserService, SerenityUiContext, ILogService, IServiceLocator)
Injects the definition, the already-built panel, and the services the view needs (called by the installer).
Declaration
public void Configure(UnityLeaderboardViewDefinition definition, UnityLeaderboardPanel panel, ILeaderboardService leaderboardService, ILeaderboardSettings leaderboardSettings, IEventDispatcherService eventDispatcherService, IViewRouter viewRouter, IViewBrowserService viewBrowserService, SerenityUiContext uiContext, ILogService logService, IServiceLocator serviceLocator = null)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityLeaderboardViewDefinition | definition | The leaderboard view definition (board id, mode, formatting, return view id). |
| UnityLeaderboardPanel | panel | The panel (themed or procedural) this view fills with ranked rows. |
| ILeaderboardService | leaderboardService | Service the view queries for ranked entries. |
| ILeaderboardSettings | leaderboardSettings | Configuration used to resolve the local player identity for AroundPlayer mode. |
| IEventDispatcherService | eventDispatcherService | Dispatcher the view subscribes to for submission signals, and that its buttons dispatch through. |
| IViewRouter | viewRouter | Router used to return to ReturnViewId on cancel, and that Show-View buttons navigate through. |
| IViewBrowserService | viewBrowserService | Navigation history; on cancel the opener's entry is popped so its own next cancel navigates instead of no-oping. |
| SerenityUiContext | uiContext | The active theme's context, used to build this view's buttons as real themed Submittables when ready. Nullable — buttons fall back to the theme's raw template or a procedural button otherwise. |
| ILogService | logService | Logging service. |
| IServiceLocator | serviceLocator | Resolves authored HUD elements' SERVICE bindings and, when it carries an ILocalizationService, the column affix translations rows render with. Nullable — a HUD binding without it renders its fallback text, and rows without it render raw authored affix text. |
Hide()
Declaration
public override void Hide()
OnDestroy()
Declaration
protected override void OnDestroy()
Show()
Declaration
public override void Show()