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
StageSpawnPointProvider
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)
Declaration
public static string FindStagePrefab(string stageFolder)
Parameters
| Type |
Name |
Description |
| string |
stageFolder |
|
Returns
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
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
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