Class PrefabSpawnerSample
A script that spawns and destroys a number of AssetReferences after a given delay.
Namespace: Global Namespace
Syntax
public class PrefabSpawnerSample : MonoBehaviour
Fields
DealyBeforeDestroying
The time, in seconds, to delay before destroying the spawned prefabs.
Declaration
public float DealyBeforeDestroying
Field Value
| Type | Description |
|---|---|
| Single |
DelayBetweenSpawns
The time, in seconds, to delay before spawning prefabs.
Declaration
public float DelayBetweenSpawns
Field Value
| Type | Description |
|---|---|
| Single |
NumberOfPrefabsToSpawn
The number of prefabs to spawn.
Declaration
public int NumberOfPrefabsToSpawn
Field Value
| Type | Description |
|---|---|
| Int32 |
SpawnablePrefab
The prefab to spawn.
Declaration
public AssetReference SpawnablePrefab
Field Value
| Type | Description |
|---|---|
| AssetReference |