Skip to main content

Introduction

InputManager is a ScriptableObject that is used as a base class to define different managers for handling input for your system. Two managers come built-in, UnityInput and RewiredInput. You can assign an Input Manager on the Interface Manager component.

Methods#

NameDescription
GetAxisReturns the value of an axis
GetButtonTrue when a button has been pressed and not released
GetButtonDownReturns true during the frame the user pressed down the virtual button identified by buttonName
GetButtonUpReturns true the first frame the user releases the virtual button identified by buttonName
GetKeyReturns true while the user holds down the key identified by name
GetKeyDownReturns true during the frame the user starts pressing down the key identified by name
GetKeyUpReturns true during the frame the user releases the key identified by name
GetMousePositionReturns the current position of the mouse
GetMouseButtonReturns true if the selected mouse button is currently pressed
GetMouseButtonDownReturns true if the selected mouse button was pressed this frame
GetVector2DReturns returns a 2D input vector
SetActiveMapSets the active input map (useful for Input System and other custom solutions
InitializeInitialize the manager