logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    UnityLocalizationServiceFactory
    Implements
    ILocalizationServiceFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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

    Implements

    ILocalizationServiceFactory
    In this article
    © 2026 Serenity. All Rights Reserved