Class UnityLeaderboardInstaller
Unity-specific installer for the Leaderboard system. Loads a UnityLeaderboardSettings asset (soft fallback to an empty board registry when none is found), resolves the configured backend via LeaderboardBackendFactory, and constructs the UnityLeaderboardService.
Namespace: Serenity.Leaderboard.Installation.Installers
Assembly: Serenity.UnityLeaderboard.Installation.dll
Syntax
public class UnityLeaderboardInstaller : LeaderboardInstaller, IFoundationInstaller, IInstaller
Constructors
UnityLeaderboardInstaller(IEventDispatcherService, ILogService)
Initializes the Unity Leaderboard installer with required service dependencies.
Declaration
public UnityLeaderboardInstaller(IEventDispatcherService eventDispatcherService, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventDispatcherService | eventDispatcherService | Dispatcher used to broadcast submission/clear signals. |
| ILogService | logService | Service for logging and error reporting. |
Methods
BuildBoardRegistry(ILeaderboardSettings, ILogService)
Builds the board registry the service is constructed with. When two rows share a BoardId, the later row wins and a warning is logged. Public and static so the duplicate-handling policy is directly testable without an installed asset.
Declaration
public static IReadOnlyDictionary<BoardId, LeaderboardDefinition> BuildBoardRegistry(ILeaderboardSettings settings, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILeaderboardSettings | settings | The leaderboard configuration, or |
| ILogService | logService | Logging service used to report duplicate board rows. May be |
Returns
| Type | Description |
|---|---|
| IReadOnlyDictionary<BoardId, LeaderboardDefinition> |
GetSettings()
Gets the loaded settings asset, or null when none was found.
Declaration
public UnityLeaderboardSettings GetSettings()
Returns
| Type | Description |
|---|---|
| UnityLeaderboardSettings |
Install(ILogService)
Installs the Leaderboard system: loads the settings asset (optional — falls back to an empty board registry with a warning when none is found), resolves the configured backend, constructs the service, and assigns it to _service.
Declaration
public override void Install(ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogService | logService | Logging service for the installation pass. |