Spawner
Spawn objects or entities over time.
Introduction
Spawner keeps producing assets into the world on a rhythm you control: enemies, plants, pickups, you name it. A word of caution: every spawned object costs performance, so go easy on the count. The Spawner component panel in the Uni editor Image The Spawner component panel in the Object editor. caption
How to Access
Select an object, open the Properties Panel, then press the Add Component button at the bottom and pick Spawner. The component stacks onto the object as a new accordion of properties. How to Access - Add Component in the Properties Panel
Another Way to Access
Shortcut: open the Asset Panel, go to the Device tab, Others category, and click the Spawner block. The editor spawns a cube with Spawner already attached, ready to adjust. How to Access - the Spawner block in Asset Panel > Device > Others
Properties
Asset The thing that gets spawned. Max Count Int The most spawned copies allowed to exist at once. Auto Destroy Bool Destroys each spawned asset automatically after its lifetime runs out. Lifetime Float How long a spawned asset lives before auto-destroy removes it. Auto Respawn Spawns a new asset on a schedule after each one appears. Cooldown The wait between spawns. Spawn Area Button Edits the region the assets appear in. Property Type Description Every property on the Spawner component.
Events
When Asset Generated Fires each time a new asset is spawned. Object: the asset that appeared Event Description Parameter Every event on the Spawner component. Each event links to its full guide, where its parameters and example live.
Commands
Generate Spawns one asset right away. None Destroy All Removes every asset this spawner has produced. Command Description Parameter Commands that drive the component from a script.
Example
Spawn a weapon every 3 seconds Spawner - Simple Example