The Actions
property is a public instance property of the InputSettings
class. It provides a list of InputAction
objects that are used by the game to define various input actions. This list can be configured to include different actions that the game recognizes and responds to.
To use the Actions
property, you can access it from an instance of the InputSettings
class. You can add, remove, or iterate over the InputAction
objects in the list to customize the input actions for your game.
Example usage:
InputSettings inputSettings = new InputSettings();
inputSettings.Actions.Add(new InputAction("Jump", KeyCode.Space));
inputSettings.Actions.Add(new InputAction("Shoot", KeyCode.Mouse0));
In this example, two input actions are added to the Actions
list: one for jumping using the space bar and another for shooting using the left mouse button.