logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameSettingsServiceFactory

    Factory class for creating Unity game settings service instances.
    Creates and configures UnityGameSettingsService with required dependencies, game settings data, and proper Unity GameObject setup.

    Inheritance
    object
    UnityGameSettingsServiceFactory
    Implements
    IGameSettingsServiceFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameSettings.Infrastructure.Services
    Assembly: Serenity.UnityGlobal.Infrastructure.dll
    Syntax
    public class UnityGameSettingsServiceFactory : IGameSettingsServiceFactory

    Constructors

    UnityGameSettingsServiceFactory(UnityGameSettingsFactory, string)

    Initializes a new instance of the UnityGameSettingsServiceFactory.
    Sets up the factory with a game settings factory and service name for GameObject creation.

    Declaration
    public UnityGameSettingsServiceFactory(UnityGameSettingsFactory gameSettingsFactory, string serviceName)
    Parameters
    Type Name Description
    UnityGameSettingsFactory gameSettingsFactory

    Factory for creating individual GameSettings objects

    string serviceName

    Name to use for the Unity GameObject that hosts the service

    Methods

    CreateService(string, string, IGameSettingsDefinition[], IEventDispatcherService, ILogService, PersistenceUseCases, IPathService, string)

    Creates and configures a complete game settings service instance.
    Instantiates a Unity GameObject with UnityGameSettingsService component, initializes it with all dependencies, creates game settings from definitions, and sets up event dispatcher integration.

    Declaration
    public IGameSettingsService CreateService(string id, string guid, IGameSettingsDefinition[] gameSettingsDefinitions, IEventDispatcherService eventDispatcherService, ILogService logService, PersistenceUseCases persistenceUseCases, IPathService pathService, string persistedFileName = null)
    Parameters
    Type Name Description
    string id

    Unique identifier for the service instance

    string guid

    GUID for the service instance

    IGameSettingsDefinition[] gameSettingsDefinitions

    Array of game settings definitions to create settings from

    IEventDispatcherService eventDispatcherService

    Event dispatcher for game settings events

    ILogService logService

    Logging service for debug and error output

    PersistenceUseCases persistenceUseCases

    Persistence use cases for file operations

    IPathService pathService

    Path service for file path resolution

    string persistedFileName

    The filename used for persisted game settings. Uses default when null.

    Returns
    Type Description
    IGameSettingsService

    Fully configured IGameSettingsService instance

    Implements

    IGameSettingsServiceFactory
    In this article
    © 2026 Serenity. All Rights Reserved