Spawn Prefab Action: Difference between revisions

From Pummel Party Mod Documentation
Jump to navigation Jump to search
(Added image and updated info)
mNo edit summary
Line 2: Line 2:
An action to spawn a [[Prefab Asset|prefab]] at a [[Gameobject|gameobject]]'s position and rotation.
An action to spawn a [[Prefab Asset|prefab]] at a [[Gameobject|gameobject]]'s position and rotation.


Multiple prefabs can be provided to this action. The prefab spawned when the action is invoked is chosen randomly.
Multiple prefabs can be provided to this Action. The prefab spawned when the action is invoked is chosen randomly.
The prefab will be spawned at the position of all targets provided if using the ''Advanced'' Target option.
The prefab will be spawned at the position of all targets provided if using the ''Advanced'' Target option.


A prefab can also/alternatively be spawned at a provided position and rotation. This position/rotation is in world space. If you want to spawn multiple prefabs at different world positions, use use multiple [[Spawn Prefab Action]]s, or use empty gameobjects as spawn points and set them as targets.
A prefab can also/alternatively be spawned at a provided position and rotation. This position/rotation is in world space. If you want to spawn multiple prefabs at different world positions, use multiple [[Spawn Prefab Action]]s, or use empty gameobjects as spawn points and set them as targets.


[[Category:Actions]]
[[Category:Actions]]

Revision as of 02:34, 16 December 2022

A Spawn Prefab action that will randomly choose between two prefabs to spawn at three transform positions.

An action to spawn a prefab at a gameobject's position and rotation.

Multiple prefabs can be provided to this Action. The prefab spawned when the action is invoked is chosen randomly. The prefab will be spawned at the position of all targets provided if using the Advanced Target option.

A prefab can also/alternatively be spawned at a provided position and rotation. This position/rotation is in world space. If you want to spawn multiple prefabs at different world positions, use multiple Spawn Prefab Actions, or use empty gameobjects as spawn points and set them as targets.