logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StageSpawnPointProvider

    Editor-only utility that scans a stage prefab for SpawnPoint components and caches the resulting spawn point ID lists keyed by stage folder path. Cache is invalidated on UnityEditor.EditorApplication.projectChanged.

    Inheritance
    object
    StageSpawnPointProvider
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Wave.Editor
    Assembly: Serenity.UnityWave.Editor.dll
    Syntax
    public static class StageSpawnPointProvider

    Methods

    ClearCache()

    Clears the entire spawn point cache.

    Declaration
    public static void ClearCache()

    FindStagePrefab(string)

    Searches stageFolder for a prefab that contains a SpawnPointRegistry component (preferred) or at least one SpawnPoint. If multiple prefabs qualify, the one with SpawnPointRegistry wins.

    Declaration
    public static string FindStagePrefab(string stageFolder)
    Parameters
    Type Name Description
    string stageFolder
    Returns
    Type Description
    string

    GetSpawnPointIds(string)

    Returns the spawn point IDs for the stage that owns the given wave asset. Returns null if the stage prefab cannot be found or contains no spawn points.

    Declaration
    public static string[] GetSpawnPointIds(string waveAssetPath)
    Parameters
    Type Name Description
    string waveAssetPath

    Asset path of the WaveConfigSO, e.g. Assets/MyGame/Media/Stages/Stage00/Waves/Wave00.asset.

    Returns
    Type Description
    string[]

    ResolveStageFolder(string)

    Walks up from the wave asset directory to locate the stage folder. Convention: wave assets live under .../Stages/StageName/Waves/, so the stage folder is the parent of the Waves directory.

    Declaration
    public static string ResolveStageFolder(string waveAssetPath)
    Parameters
    Type Name Description
    string waveAssetPath
    Returns
    Type Description
    string

    ScanStagePrefab(string)

    Finds the stage prefab inside stageFolder and extracts all SpawnPoint IDs from it.

    Declaration
    public static string[] ScanStagePrefab(string stageFolder)
    Parameters
    Type Name Description
    string stageFolder
    Returns
    Type Description
    string[]
    In this article
    © 2026 Serenity. All Rights Reserved