Class UnityLocalizationInstaller
Unity-specific installer for the localization system that configures services, use cases, and validates settings.
Extends LocalizationInstaller to provide Unity-specific localization setup with asset loading and service registration.
Namespace: Serenity.Localization.Installation.Installers
Assembly: Serenity.UnityLocalization.Installation.dll
Syntax
public class UnityLocalizationInstaller : LocalizationInstaller, IFoundationInstaller, IInstaller
Constructors
UnityLocalizationInstaller()
Declaration
public UnityLocalizationInstaller()
Methods
Install(LocalizationInstallerInstallInput)
Installs and configures the Unity localization system with the provided input dependencies.
Loads settings from Unity-specific DTO or falls back to asset loading, validates configuration, and sets up services and use cases.
Declaration
public override void Install(LocalizationInstallerInstallInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| LocalizationInstallerInstallInput | input | Installation input containing event dispatcher and game settings services |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when settings are not found or required services are null |
| ArgumentException | Thrown when language keys are empty |
InstallService(ILocalizationSettings, IEventDispatcherService, IGameSettingsService)
Creates a localization service instance using the service factory with the provided configuration.
Uses the Unity localization service factory to create a properly configured service instance.
Declaration
protected override ILocalizationService InstallService(ILocalizationSettings settings, IEventDispatcherService eventDispatcherService, IGameSettingsService gameSettingsService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILocalizationSettings | settings | Localization settings containing language keys and tables |
| IEventDispatcherService | eventDispatcherService | Event dispatcher service for localization events |
| IGameSettingsService | gameSettingsService | Game settings service for language persistence |
Returns
| Type | Description |
|---|---|
| ILocalizationService | Configured localization service instance |
InstallServiceFactory()
Creates and returns a Unity-specific localization service factory.
Provides the factory implementation used to create localization service instances.
Declaration
protected override ILocalizationServiceFactory InstallServiceFactory()
Returns
| Type | Description |
|---|---|
| ILocalizationServiceFactory | Unity localization service factory instance |
InstallUseCases(ILocalizationService)
Creates and configures localization use cases with the provided localization service.
Instantiates all required use cases for game language and voice language operations.
Declaration
protected override LocalizationUseCases InstallUseCases(ILocalizationService service)
Parameters
| Type | Name | Description |
|---|---|---|
| ILocalizationService | service | Localization service to use for the use cases |
Returns
| Type | Description |
|---|---|
| LocalizationUseCases | Configured LocalizationUseCases containing all language operation use cases |