Spawner
Most games need some sort of object spawner. The internal spawn logic can look a bit different depending on scenario and context. This is why we created a scalable and modular Object Spawner.

// we extend SpawnpointsSpawner which requires two "arguments":
// 1: type to spawn (Ball) 2: the current type (BallSpawner)
public class BallSpawner : SpawnpointsSpawner<Ball, BallSpawner>
{
public override Ball Spawn(Object obj, Vector3 point)
{
return Instantiate(obj.obj, point, Quaternion.identity); // instantiate the object.
}
public override void Dispose(Ball copy)
{
base.Dispose(copy); // must call.
Destroy(copy.gameObject); // destroy the game object.
}
}Spawn object
List of all pre-made spawners
Create custom spawner
Last updated