Class SpawnService
Provides methods for spawning units in the game world.
public static class SpawnService
- Inheritance
-
SpawnService
- Inherited Members
Methods
SpawnUnitWithCallback(PrefabGUID, float3, float, Action<Entity>)
Spawns a unit at the specified position and executes a callback action after a duration.
public static void SpawnUnitWithCallback(PrefabGUID unit, float3 position, float duration, Action<Entity> postActions)
Parameters
unit
PrefabGUIDThe PrefabGUID of the unit to spawn.
position
float3The position in 3D space where the unit will be spawned.
duration
floatThe duration in seconds before the callback is executed.
postActions
Action<Entity>The callback action to execute after the duration. Takes the spawned Entity as a parameter.