Easy Input

Easy Input provides a simple way to modify inputs within Unity as it expands upon Unity’s Input Manager. It’s great if you want more options for key presses, to organize your buttons through names, or if you choose to use an external Xbox Controller in your program.

 

Overview

Unity’s Input Manager is super flexible; however, it does have some challenges when it comes to changing input mappings at run-time and supporting Xbox controllers across platforms.

Easy Input makes it…well, easy.

Not only is it super simple to grab user input information, but it simplifies the process of setting up and supporting the Xbox controller.

With Easy Input, you also have access to advanced information like how long a button has been pressed and double-click support for all keys and buttons. You can even setup actions that can be triggered by any number of inputs to simplify the game logic.

When used with the Event System – Dispatcher, Easy Input supports pushing keyboard, mouse, and Xbox controller events to listeners.

For more information on the Event System – Dispatcher, follow this link.

 

Features

Easy Input supports the following features:
 Action alias support with multiple inputs
 Action alias support with ‘helper’ input (ie ‘T + Alt’)
 Ability to change input mappings at run-time
 Xbox controller support for Windows and Mac (no code changes required)
 Advanced info for all keys and buttons:
o Time pressed & elapsed ‘pressed’ time
o Time released & elapsed ‘released’ time
o Double-press
o Toggle
o Custom function calling
 Simple access to mouse states
 Simple access to keyboard states
 Simple access to Xbox controller states
 Complete code base to use as-is or modify
 Simplified setup process

 

Contents

This package contains:
 The core classes used to manage the input.
 A zip file containing the Unity input settings, pre-configured for you.
 A sample scene to show how to set up ‘action aliases’ and access input information.

 

Performance

Most of the performance impact of the Easy Input InputManager is felt at the very end of the frame.

This is where the system tests for input activity and updates its state values.
This means that using a polling approach for input handling during GameObject updates are less impactful on performance.

In performance tests on Windows 8, Easy Input processing took on average 0.03 milliseconds per frame.

 

Next Steps

Check out the setup page to learn how to set up Easy Input.

 

Important Locations

Demos: Assets\ootii\_Demos\EasyInput\Scenes

Input Code: Assets\ootii\Assets\EasyInput\Code\Input

Framework Code: Assets\ootii\Assets\Framework_v1\Code
Page Contents