string UseButton { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The UseButton property in the PlayerController class specifies the input button that the player will press to interact with objects in the game. This property is part of the input system and is used to define the key or button that triggers the "use" action, allowing players to interact with various elements within the game environment.

Usage

To set the UseButton property, assign a string representing the desired input button. This string should correspond to a valid input action defined in your input configuration. For example, you might set it to "E" to use the "E" key for interactions.

Example

// Example of setting the UseButton property
PlayerController playerController = new PlayerController();
playerController.UseButton = "E"; // Sets the use button to the "E" key