Class UnityGameProgressInstaller
Unity-specific installer for the GameProgress system. Loads a UnityGameProgressSettings asset (soft fallback to the PlayerPrefs default backend when none is found), resolves the configured backend via GameProgressBackendFactory, and constructs the UnityGameProgressService.
Namespace: Serenity.GameProgress.Installation.Installers
Assembly: Serenity.UnityGameProgress.Installation.dll
Syntax
public class UnityGameProgressInstaller : GameProgressInstaller, IFoundationInstaller, IInstaller
Remarks
The service caches progress in memory; this installer does NOT eagerly load it from the
store. A project must await GameProgressInstaller.GetService().LoadAsync() once
during its own bootstrap before relying on GetProgress() reflecting previously saved
data — blocking on store I/O synchronously here would stall Unity's main thread.
Constructors
UnityGameProgressInstaller(IEventDispatcherService, ILogService)
Initializes the Unity GameProgress installer with required service dependencies.
Declaration
public UnityGameProgressInstaller(IEventDispatcherService eventDispatcherService, ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventDispatcherService | eventDispatcherService | Dispatcher used to broadcast progress signals. |
| ILogService | logService | Service for logging and error reporting. |
Methods
GetSettings()
Gets the loaded settings asset, or null when none was found.
Declaration
public UnityGameProgressSettings GetSettings()
Returns
| Type | Description |
|---|---|
| UnityGameProgressSettings |
Install(ILogService)
Installs the GameProgress system: loads the settings asset (optional — falls back to the PlayerPrefs default backend 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. |