Spawn Prefab Action: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Added image and updated info) |
||
Line 1: | Line 1: | ||
An action to spawn a prefab at a gameobject's position and rotation. | [[File:SpawnPrefabAction.png|thumb|right|600px|A Spawn Prefab action that will randomly choose between two prefabs to spawn at three transform positions.]] | ||
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. | |||
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. | |||
[[Category:Actions]] | [[Category:Actions]] |
Revision as of 02:17, 7 December 2022
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 use multiple Spawn Prefab Actions, or use empty gameobjects as spawn points and set them as targets.