logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnitySpawnFactory

    Unity implementation of ISpawnFactory using GameObjects.

    Inheritance
    object
    UnitySpawnFactory
    Implements
    ISpawnFactory
    Namespace: Serenity.GameSpawner.Infrastructure.Factories
    Assembly: Serenity.UnityGameSpawner.Infrastructure.dll
    Syntax
    public class UnitySpawnFactory : MonoBehaviour, ISpawnFactory
    Remarks

    Creates empty GameObjects as spawned entity containers. Game-specific implementations can override this factory to use prefabs, object pools, or other instantiation strategies.

    Constructors

    UnitySpawnFactory()

    Declaration
    public UnitySpawnFactory()

    Methods

    Create(SpawnType)

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

    Destroy(SpawnHandle)

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

    DestroyAll(SpawnType)

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

    Implements

    ISpawnFactory
    In this article
    © 2026 Serenity. All Rights Reserved