Next: Active Object, Previous: Melee Weapon Attributes, Up: Inventory [Contents][Index]
This component handles the unique case when you are able to spawn minions from inventory items. It will return the item to inventory if spawning fails. To use it, attach it to an empty object that is instantiated at ’Instantiation Transform’ when used from inventory. If the criteria for spawning are met, it will destroy itself and spawn a minion, otherwise it will return the item to your inventory. This system does not work with object pooling.
LayerMask
rayMaskWhat objects should we look for to spawn on? This performs a raycast straight down to find out if we’re deploying onto a valid surface. Generally, this will occur at the Instantiation Transform designated on the Inventory component.
float
rayDistanceHow far down from the origin are we willing to look for a surface to spawn on?
Default value: 2.0f
GameObject
minionUnit we are attempting to spawn
GameObject
activeObjectA reference to an inventory item that will be added back in to the inventory in case we fail to spawn anything
LayerMask
rayMaskWhat objects should we look for to spawn on? This performs a raycast straight down to find out if we’re deploying onto a valid surface. Generally, this will occur at the Instantiation Transform designated on the Inventory component.
float
rayDistanceHow far down from the origin are we willing to look for a surface to spawn on?
Default value: 2.0f
GameObject
minionUnit we are attempting to spawn
GameObject
activeObjectA reference to an inventory item that will be added back in to the inventory in case we fail to spawn anything
Next: Active Object, Previous: Melee Weapon Attributes, Up: Inventory [Contents][Index]