Next: Holo Text, Previous: Deployed Object, Up: Interaction [Contents][Index]
This component implements TF2-style deployment functionality. To use, supply a matching list for each object in ’Deployables’ you need one in ’Ghost Deployables’ ’Buttons’ ’Deployables Count’ and ’Deployables Max’. So for example if ’Deployables’ #3 is a turret, then ’Deployables Count’ #3 indicates how many turrets we have.
For an in-depth explanation of use, see the accompanying documentation file (found in this folder)
string
forbiddenSurfaceTagForbidden objects should have this tag so you can’t deploy on them
Default value: "NoDeploy"
bool
showGUIShould we use a legacy Unity GUI? Not suitable for mobile devices
Default value: true
Rect
guiAreaNormalized viewport rectangle indicating the screen area for the legacy GUI, values between 0 and 1
Default value: new Rect(0.01f, 0.01f, 0.88f, 0.1f)
Rect
deployButtonNormalized viewport rectangle indicating the screen area for the ’Deploy’ button, values between 0 and 1
Default value: new Rect(0.89f, 0.01f, 0.2f, 0.1f)
GameObject[]
deployablesOrdered list of objects that can be deployed
GameObject[]
ghostDeployablesOrdered list matching the Deployables list indicating prefabs with no collider used as ’ghosts’ or ’holograms’ showing where the object will go
Ordered list matching the Deployables list indicating the button textures
int[]
deployablesCountOrdered list showing the available number of each deployable currently available
int[]
deployablesMaxOrdered list showing the max available for each deployable
Directions
directionDirection to render the button list
Default value: Directions.Horizontal
GameObject
deployRayOriginAn object indicating the origin of the deploy ray. In a first person game, should be in front of and slightly above the camera. Raycasts downward automatically
float
deployRayRangeHow far from the Deploy Ray Origin do we look down to check if we can deploy on a given surface?
Default value: 2.4f
KeyCode
deployModeKeyKey for turning on/off deploy mode
Default value: KeyCode.Q
KeyCode
nextItemKey for scrolling through available deploys
Default value: KeyCode.X
KeyCode
previousItemKey for scrolling back through available deploys
Default value: KeyCode.Z
KeyCode
deployItemKey that deploys the selected item immediately
Default value: KeyCode.E
Stops the deployment process
Changes which deployable is currently selected and initiates deployment.
Argument: An integer indicating which deployable we wish to use. Zero-indexed, so the first element is 0, and the last is the number of elements minus one.
Attempts to deploy the currently selected Deployable
string
forbiddenSurfaceTagForbidden objects should have this tag so you can’t deploy on them
Default value: "NoDeploy"
bool
showGUIShould we use a legacy Unity GUI? Not suitable for mobile devices
Default value: true
Rect
guiAreaNormalized viewport rectangle indicating the screen area for the legacy GUI, values between 0 and 1
Default value: new Rect(0.01f, 0.01f, 0.88f, 0.1f)
Rect
deployButtonNormalized viewport rectangle indicating the screen area for the ’Deploy’ button, values between 0 and 1
Default value: new Rect(0.89f, 0.01f, 0.2f, 0.1f)
GameObject[]
deployablesOrdered list of objects that can be deployed
GameObject[]
ghostDeployablesOrdered list matching the Deployables list indicating prefabs with no collider used as ’ghosts’ or ’holograms’ showing where the object will go
Ordered list matching the Deployables list indicating the button textures
int[]
deployablesCountOrdered list showing the available number of each deployable currently available
int[]
deployablesMaxOrdered list showing the max available for each deployable
Directions
directionDirection to render the button list
Default value: Directions.Horizontal
GameObject
deployRayOriginAn object indicating the origin of the deploy ray. In a first person game, should be in front of and slightly above the camera. Raycasts downward automatically
float
deployRayRangeHow far from the Deploy Ray Origin do we look down to check if we can deploy on a given surface?
Default value: 2.4f
KeyCode
deployModeKeyKey for turning on/off deploy mode
Default value: KeyCode.Q
KeyCode
nextItemKey for scrolling through available deploys
Default value: KeyCode.X
KeyCode
previousItemKey for scrolling back through available deploys
Default value: KeyCode.Z
KeyCode
deployItemKey that deploys the selected item immediately
Default value: KeyCode.E
Stops the deployment process
Changes which deployable is currently selected and initiates deployment.
Argument: An integer indicating which deployable we wish to use. Zero-indexed, so the first element is 0, and the last is the number of elements minus one.
Attempts to deploy the currently selected Deployable
Next: Holo Text, Previous: Deployed Object, Up: Interaction [Contents][Index]