Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
SpawnPrefab Class Reference

Detailed Description

Spawns a prefab. This function can be triggered by a Unity Event. This was initially made to drop potions when pots break.

Documentation updated 3/9/2024

Author
Stephen Nuttall, Alexander Art

Public Member Functions

void Spawn ()
 Spawns the prefab.
 

Private Attributes

Transform prefabToSpawn
 Reference to the prefab we want to spawn.
 
bool inheritScale
 True if the spawned prefab should spawn with the same scale as the object that runs this script.
 
bool inheritRotation
 True if the spawned prefab should spawn with the same rotation as the object that runs this script.
 

Member Function Documentation

◆ Spawn()

void SpawnPrefab.Spawn ( )

Spawns the prefab.

Spawns the prefab at the parent object's position.

Member Data Documentation

◆ inheritRotation

bool SpawnPrefab.inheritRotation
private

True if the spawned prefab should spawn with the same rotation as the object that runs this script.

◆ inheritScale

bool SpawnPrefab.inheritScale
private

True if the spawned prefab should spawn with the same scale as the object that runs this script.

◆ prefabToSpawn

Transform SpawnPrefab.prefabToSpawn
private

Reference to the prefab we want to spawn.


The documentation for this class was generated from the following file: