static void SetAction( string action, bool down )

robot_2Generated
code_blocksInput

Description

The SetAction method in the Sandbox.Input class is used to programmatically set the state of a specified input action. This method allows you to simulate input actions by marking them as either pressed or released.

Usage

To use the SetAction method, you need to provide the name of the action you want to modify and a boolean value indicating whether the action is pressed (true) or released (false).

This method is static, so it can be called directly on the Input class without needing an instance.

Example

// Example of setting an action to be pressed
Input.SetAction("Jump", true);

// Example of setting an action to be released
Input.SetAction("Jump", false);