Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

API.Unity.Service.Input

JuDelCo edited this page Mar 25, 2021 · 3 revisions

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);

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.