Class UnityLocalizationServiceFactory
Unity-specific factory for creating localization service instances as MonoBehaviour components.
Creates a new GameObject with the UnityLocalizationService component and initializes it with the provided dependencies.
Implements
Inherited Members
Namespace: Serenity.Localization.Infrastructure.Services
Assembly: Serenity.UnityLocalization.Infrastructure.dll
Syntax
public class UnityLocalizationServiceFactory : ILocalizationServiceFactory
Constructors
UnityLocalizationServiceFactory()
Declaration
public UnityLocalizationServiceFactory()
Methods
CreateService(string, ILocalizationSettings, IEventDispatcherService, IGameSettingsService)
Creates a Unity localization service instance attached to a new GameObject.
Instantiates a GameObject with the specified name, adds the UnityLocalizationService component, and initializes it with the provided settings and services.
Declaration
public ILocalizationService CreateService(string serviceName, ILocalizationSettings settings, IEventDispatcherService eventDispatcherService, IGameSettingsService gameSettingsService)
Parameters
| Type | Name | Description |
|---|---|---|
| string | serviceName | Name for the GameObject that will host the localization service |
| 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 | Initialized Unity localization service instance |