Button


THE CONTROLLER BUTTON

The Controller Button is a UI Component that can be very useful for providing Controller Buttons on Mobile Platforms without losing compatibility with Desktop Platforms.

When creating your own custom buttons, you must set the ControllerButtonObject as a parent of your object.


MAPPING INPUTS

ControllerButtonObject provides the Add() method for mapping multiple Button Inputs to a single Controller Button.

In the example above, pressing or releasing the Space key on your keyboard or the B button on your gamepad will affect the Button States of the Controller Button.

PLEASE NOTE
You can Add() as many Button Inputs as you like: there are no limits so be careful not to add duplicates because  it's just a waste of performance.

RETRIEVING BUTTON STATES

ControllerButtonObject also provides the IsDown, IsUp, IsPressed and IsReleased local variables.

Assuming you have a reference to an object that inherits from ControllerButtonObject you can easily access to those variables.

REMARKS

When you set a ControllerButtonObject as Not Visible, Mouse Clicks and Touch Inputs are ignored while the inputs coming from Button Inputs you Add() are still detected.

Get Giavapps Controller 2

Buy Now$9.99 USD or more