API.Unity.Service.Input - JuDelCo/Core GitHub Wiki

InputUnityService

There are two implementations of this service. One will use the Unity Input Manager (legacy) as the backend for the Input, the other will use the new Unity Input System package.

The used backend will be selected automatically depending on if you have enabled the InputSystem package one and the other one will be disabled using preprocessor directives.

There are also extension methods provided for easier use in Unity:

// For IGamepadController
Vector2 GetAxisRaw(GamepadAxis axis);

// For IMouseController
Vector2Int GetPosition();
Vector2 GetPositionDelta();

// For IInputAction
Vector2 GetAxisRawValue();

// For IAIInputAction
Set(Vector2 value);