logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityGameSpawnerService

    Unity MonoBehaviour implementation of IGameSpawnerService.

    Inheritance
    object
    UnityGameSpawnerService
    Implements
    IGameSpawnerService
    IService
    IFoundationSettings
    Namespace: Serenity.GameSpawner.Infrastructure.Services
    Assembly: Serenity.UnityGameSpawner.Infrastructure.dll
    Syntax
    public class UnityGameSpawnerService : MonoBehaviour, IGameSpawnerService, IService, IFoundationSettings
    Remarks

    Delegates entity creation and destruction to an ISpawnFactory. Tracks active handles per spawn type for pool state reporting.

    Constructors

    UnityGameSpawnerService()

    Declaration
    public UnityGameSpawnerService()

    Properties

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    LogService

    Declaration
    public ILogService LogService { get; set; }
    Property Value
    Type Description
    ILogService

    Methods

    Despawn(SpawnHandle)

    Declaration
    public void Despawn(SpawnHandle handle)
    Parameters
    Type Name Description
    SpawnHandle handle

    DespawnAll()

    Declaration
    public void DespawnAll()

    DespawnAll(SpawnType)

    Declaration
    public void DespawnAll(SpawnType type)
    Parameters
    Type Name Description
    SpawnType type

    GetPoolState(SpawnType)

    Declaration
    public PoolStateSnapshot GetPoolState(SpawnType type)
    Parameters
    Type Name Description
    SpawnType type
    Returns
    Type Description
    PoolStateSnapshot

    InitializeService(ILogService, ISpawnFactory)

    Initializes the service with required dependencies.

    Declaration
    public void InitializeService(ILogService logService, ISpawnFactory factory)
    Parameters
    Type Name Description
    ILogService logService

    The logging service for diagnostic output.

    ISpawnFactory factory

    The spawn factory for entity creation and destruction.

    IsActive(SpawnHandle)

    Declaration
    public bool IsActive(SpawnHandle handle)
    Parameters
    Type Name Description
    SpawnHandle handle
    Returns
    Type Description
    bool

    Spawn(SpawnType)

    Declaration
    public SpawnHandle Spawn(SpawnType type)
    Parameters
    Type Name Description
    SpawnType type
    Returns
    Type Description
    SpawnHandle

    Implements

    IGameSpawnerService
    IService
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved