Input System
The game uses Input System and allows seamlessly switching between different devices during any stage of gameplay.
PC
UI Joystick, Gamepad, Keyboard
Mouse, Gamepad, Keyboard
WebGL
UI Joystick, Gamepad, Keyboard
Mouse, Gamepad, Keyboard
Mobile (IOS/Android)
UI Joystick, Gamepad
Touch, Gamepad
Input Asset
Input Asset located at:
It contains two action maps: UI and Gameplay
UI Action Map
This action map contains default UI actions like click and navigate, as well as two custom actions:
Settings - this action is responsible for opening settings window in main menu and for opening pause window during gameplay.
Settings action bindings Back - this action map is responsible for closing main menu windows and pause window in during gameplay.
Back action bindings
Gameplay Action Map
This action map contains only one action - Movement. It is responsible for the movement of the character during gameplay.

You can add additional bindings to the actions above to accommodate for more specific devices.
Input Manager
Input Manager manages switching between different input types, provides access to the Input Asset and controlls the visibility of UI Joystick and Button Highlights.
public class InputManager : MonoBehaviour
{
///...
// This value shows the currently active input type (UIJoystick, Keyboard, Gamepad)
public InputType ActiveInput { get => save.ActiveInput; private set => save.ActiveInput = value; }
// This value is used for calculating movement of the player
public Vector2 MovementValue { get; private set; }
// This event fires every time the input type changes
// First parameter is the previous input type
// Second parameter is the new input type
public event UnityAction<InputType, InputType> onInputChanged;
//...
}
// Use GameController.InputManager to get Input Manager from anywhere from the project
Last updated