ObjectSpawner

This component, on the most basic level, allows your prefab to remember other prefabs. It also comes with a spawn function that instantly remembers the spawned objects.

Component ObjectSpawner Fields

TypeNameDescription
tableobjectsArray containing all children
functiononnewobjectfnFires when a new object gets spawned, added or loaded. Args: inst, obj

Component ObjectSpawner Methods

NameParameterReturnsDescription
TakeOwnershipinstanceniladds the instance to the children/objects
SpawnObjectprefab_namenilspawns and adds the prefab at once (this does not set the position or such)

Example