GamepadCode GamepadCode { get; set; }

robot_2Generated
code_blocksInput

Description

The GamepadCode property of the InputAction class specifies which gamepad button should be mapped to this input action. This property is part of the keybinding system, allowing developers to define gamepad controls for their game actions.

Usage

To use the GamepadCode property, assign it a value from the Sandbox.GamepadCode enumeration that corresponds to the desired gamepad button. This will map the input action to the specified button, enabling gamepad interaction for the action.

Example

// Example of setting the GamepadCode property for an InputAction
InputAction jumpAction = new InputAction();
jumpAction.Name = "Jump";
jumpAction.GamepadCode = Sandbox.GamepadCode.A; // Maps the 'A' button on the gamepad to the Jump action