-
Notifications
You must be signed in to change notification settings - Fork 84
InputManager
The InputManager class contains methods for using Unity's Input API regardless of which input package is being used by the game (Legacy or InputSystem).
It supports the common input API features such as MousePosition, MouseScrollDelta, GetKey/Down, GetMouseButton/Down, etc.
InputManager requires the startupDelay from Universe.Init to have finished, so any calls to its methods before then will return default.
All key-related InputManager methods take a UnityEngine.KeyCode as opposed to a UnityEngine.InputSystem.Key, since KeyCode is always included in all builds of Unity, whereas Key is only present in games which use the InputSystem package.
If the game in fact uses InputSytem, UniverseLib will translate the KeyCode into the corresponding Key to the best of its ability. If you find a Key which is unsupported, please create an issue in this repository.