Skip to content

Spawner ​

class in OpalScript

Spawns a prefab on an interval at this object's position. Great for enemy waves, obstacles, and pickups.

Properties ​

MemberDescription
Spawner.RunningTrue while the spawner is actively spawning.
Spawner.SpawnCountHow many prefabs have been spawned this play.

Methods ​

MemberDescription
Spawner.SpawnNowSpawn one prefab immediately, ignoring the interval.
Spawner.StartSpawningStart the authored spawn schedule during Play.
Spawner.StopSpawningStop scheduled spawning.
Spawner.ResetCountClear the spawn count so the limit applies fresh.
Spawner.IsRunningWhether scheduled spawning is active.

See also ​