PrefabSpawner
Description
Spawns a referenced prefab at the chosen position with the chosen parent and destroys it after set time if it's value is not set to zero, if it is zero, the prefab won't be destroyed. Useful for spawning particle prefabs.
Public methods
void SpawnPrefabAtTransform(GameObject gameObject, Transform spawnPosition, Transform parent, float destroyTime)
spawns at the transform of a certain object
void SpawnPrefabAtVector(GameObject prefab, Vector3 spawnPosition, Transform parent, float destroyTime)
spawns at a certain vector3
Last updated