Class UnityGameGraphicsInstaller
Unity-specific installer for game graphics module within dependency injection foundation.
Extends GameGraphicsInstaller to provide Unity graphics service installation with
settings resolution, service factory configuration, and use case setup.
Handles Unity-specific graphics settings loading from addressable assets and validates
configuration before creating graphics service with event dispatcher integration.
Namespace: Serenity.GameGraphics.Installation.Installers
Assembly: Serenity.UnityGameGraphics.Installation.dll
Syntax
public class UnityGameGraphicsInstaller : GameGraphicsInstaller, IFoundationInstaller, IInstaller
Constructors
UnityGameGraphicsInstaller()
Declaration
public UnityGameGraphicsInstaller()
Methods
Install(GameGraphicsInstallerInstallInput)
Installs Unity game graphics service with settings resolution and dependency configuration.
Attempts to use Unity-specific DTO settings first, then falls back to addressable asset
loading. Validates settings and event dispatcher service, creates service factory,
instantiates graphics service, and sets up use cases for graphics operations.
Declaration
public override void Install(GameGraphicsInstallerInstallInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| GameGraphicsInstallerInstallInput | input | GameGraphicsInstallerInstallInput containing event dispatcher service and optional settings |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when settings cannot be found or event dispatcher is null |
| ArgumentException | Thrown when settings have invalid configuration |
InstallService(IGameGraphicsSettings, IEventDispatcherService, ILogService, IGameSettingsService)
Creates Unity game graphics service with settings and event dispatcher configuration.
Uses service factory to instantiate graphics service with proper service name,
settings configuration, and event dispatcher integration for graphics operations
and settings change notifications.
Declaration
protected override IGameGraphicsService InstallService(IGameGraphicsSettings settings, IEventDispatcherService eventDispatcherService, ILogService logService, IGameSettingsService gameSettingsService)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameGraphicsSettings | settings | Graphics settings configuration for service initialization |
| IEventDispatcherService | eventDispatcherService | Event dispatcher for graphics change notifications |
| ILogService | logService | Log service for logging information |
| IGameSettingsService | gameSettingsService | Game settings service for reading persisted user settings |
Returns
| Type | Description |
|---|---|
| IGameGraphicsService | Configured Unity game graphics service instance |
InstallServiceFactory()
Creates Unity-specific game graphics service factory.
Instantiates UnityGameGraphicsServiceFactory for creating Unity graphics services
with proper GameObject component attachment and service configuration.
Declaration
protected override IGameGraphicsServiceFactory InstallServiceFactory()
Returns
| Type | Description |
|---|---|
| IGameGraphicsServiceFactory | Unity game graphics service factory instance |
InstallUseCases(IGameGraphicsService)
Creates and configures game graphics use cases with service dependency.
Instantiates individual use cases for quality level management, resolution control,
and screen settings operations, then aggregates them into GameGraphicsUseCases
container for coordinated graphics functionality access.
Declaration
protected override GameGraphicsUseCases InstallUseCases(IGameGraphicsService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameGraphicsService | service | Graphics service instance for use case operations |
Returns
| Type | Description |
|---|---|
| GameGraphicsUseCases | Configured GameGraphicsUseCases containing all graphics operations |