Getting started

Introduction

The Input System is based on top of unity's legacy Input System and provides a way to change input layout for the user. It comes with scripts that will let you add button remapping with little time. Currently in early beta, it doesn't support controllers and it is planned to be expanded more in version 0.2.0.

Setup

Firstly you have to add the Input Assigner from GameObject/qASIC/Input assign. Then you will have to assign an Input Preset. You can create it from Create/qASIC/Input/Input Preset. In it you can assign your keys.

Usage

To get current input from a remappable key you can call InputManager.GetInput("key name"). Key name refers to the name that has been assigned in the Input Preset. You can combine two keys to get an axis by InputManager.GetAxis("positive key name", "negative key name"). You can also change the key by InputManager.ChangeInput("key name", new KeyCode). You don't really need to do that, because there are already built in tools for that.

Remapping

You can already remap keys using the inputcommand in the console. For a more intuitive way you can add the Input Assign and Input Listener to a button. You will have to configure Buttons on click to call InputAssign.StartListening. You will also need to assign the keyName and the listener in Input Assign. You can check out an example in the demo scene.

Last updated