RewiredTM is an advanced input system for Unity

Take input to the next level! Rewired makes joysticks, the keyboard, mouse, and other controllers work as they should. Need something more than Unity's basic input system? Have you tried other solutions only to find they have too many limitations? Check out Rewired...

 

Get Rewired on the Unity Asset Store!

 

DocumentationSupportDownload a Free Trial

A Full-Featured Input Editor

Create and edit all your Players, Actions, Input Behaviors, Maps, Categories, and more directly in the Rewired Editor. The editor is packed with features and has an intuitive workflow.

Native Input

Rewired is not just another Unity input wrapper like other packages. Rewired supports many platforms that Unity supports with extended native support on Windows, OSX, Linux, Windows 8 Store, Windows 10 Universal, Ouya, XBox One[2], and PS4[2]. Rewired leverages native libraries to access input devices directly, allowing for far more control over input. This makes possible some very powerful features such as full hot-plugging support for joysticks and support for more than 20 buttons per controller. Rewired is the only input system available for Unity with native support for these platforms and the only one to offer these advanced features. For other platforms, Rewired utilizes Unity's input system so you still get access to all the other features it provides.

How does Rewired stack up to the competition?

There certainly are other choices out there for handling input in Unity games.
Check out the table below and see how Rewired compares to the most popular input solutions.

Input System Comparison Chart

Why do I need another input system?
Can't I just use Unity input?

Unity's joystick support is very limited, making it's impossible to give the user a good joystick experience in a single or multi-player game.

Problems With Unity Input

  • Poor hot-plugging support. Some platforms support hot-plugging to a degree while others do not support it at all. When hot-plugging controllers on platforms that support it, you can never know which Unity joystick Id the controller will be assigned to. It becomes a mess trying to identify which controller is which so you can get input, and requires user interaction to assist. In general, it's easier to make the user quit and restart the game so the joystick Ids are back in order again. All of these situations could require the user to quit and restart the game:
    • User forgets to plug in a controller before the game starts.
    • A wireless controller falls asleep.
    • User unplugs a controller that makes the existing controller Ids shift (on some platforms).
    • User plugs in a new controller.
  • You are forced to detect when a joystick is removed and display a message warning the player that he must quit and restart the game. This leads to a very poor experience for joystick users in Unity games.

  • Cross-platform joystick control is a nightmare because controllers axes, buttons, and hats can be different on each platform.
  • It is problematic to map a controller to a player without polling for a button press and asking the user to identify each joystick because GetJoystickNames is completely unrealiable on some platforms.
  • Action mapping is based on fixed joystick ids and fixed axis and button ids. Since every joystick is different, there's no way to reliably map controller elements to actions for different controllers.
  • It is extremely difficult to make pre-defined mapping layouts because of cross-platform differences, and it is difficult to assign a layout to a particular joystick due to the joystick id issues.
  • Connected joystick IDs can change when another controller is unplugged on some platforms throwing off all your player-joystick associations.
  • Multi-player, multi-joystick games are just a total mess.
  • D-Pads (hats) in OSX are completely broken on many controllers and essentially unusable.
  • OSX and Linux report different zero state values for axes depending on whether the axis has been pressed in the current session or not. Zero may be 0 at first, then -1 after the initial press.
  • Without manual calibration by the user, joystick axes are totally unreliable on Linux. Linux axes randomly calibrate zero as 0, -0.5, or 0.5 and persist for the session. Sometimes this is a single axis on a controller, sometimes multiple. Quitting and restarting may reset these axes, but others may calibrate wrongly instead. Unity provides no means for user axis calibration.

 

  • The Input.GetJoystickNames array behaves differently on every single platform making joystick identification unreliable. Some platforms leave empty spaces in the array when a joystick is removed, some collapse the array, some reorder the joysticks randomly, and some leave phantom entries when a joystick is unplugged. Linux is so bad that it will add a new phantom joystick entry each and every time you plug and unplug the controller without limit making it impossible to tell how many controllers are attached.
  • On Windows, if continually hot-plugging controllers, it's possible to lock Unity into a state where any joytick or mouse button press will activate every possible joystick and mouse keycode simultaneously. This effectively renders input useless. The only solution is to quit and restart the game.

Missing features

  • Not player-based.
  • No in-game control mapping.
  • No event-driven input.
  • No reliable way to identify a controller.
  • No controller connect or disconnect events.
  • No support for input in FixedUpdate or OnGUI.
  • No controller maps.
  • No cross-platform profiles.
  • No runtime axis calibration.
  • No vibration/rumble support.
  • No saving/loading configurations.
  • No categorization of actions.
  • No double-click / double-press detection.
  • Limited to 20 buttons per joystick.
  • Limited to 20 axes per joystick.
  • Limited to 11 joysticks.
  • Difficult-to-use, limited input manager.

Threads About Unity's Input Woes

Feedback Requests

What exactly does Rewired offer?

Rewired has so many great features, it's hard to list them all...

 

Features

  • Works in Unity Free and Pro.
  • Player-centric input system.
  • Full hot-plugging support on Windows, OSX, Linux, Windows 8 Store, Windows 10 Universal, Ouya, Xbox One, and PS4. (Other platforms depend on Unity's input system's support for hot-plugging on that platform.)
  • Extended native input support on several platforms.
  • Optional XInput support for Windows (mandatory for Windows 8 Store).
  • Fallback on Unity input for all other platforms. Most features still work.
  • Intelligent auto assignment and re-assignment of controllers to players on connect/disconnect with configurable options to tune the assignment to your needs.
  • Connect, pre-disconnect, and disconnect events.
  • Get input in Update, Fixed Update, and OnGUI -- you choose which loops update runs in, one or multiple as needed.
  • Customizable and saveable controller maps -- export mappings to XML and save how you choose (example included using PlayerPrefs, but save however you like.)
  • Included Control Mapper system using Unity GUI allows your players to rebind controls at runtime.
  • Unlimited mapping layouts per controller.
  • Controller Templates (see Controllers section).
  • Included on-screen touch controls for mobile platforms. (Unity 5.0+)
  • Editor GUI for creating Actions, Input Behaviors, Joystick/Keyboard/Mouse maps, categories, etc.
  • Editor GUI for creating and editing Joystick Hardware Maps (for adding new fully-supported joysticks).
  • Editor GUI for creating and editing Controller Templates (for adding new templates or adding new joysticks to a template).
  • Extremely versatile -- can be used for simple 1-player games all the way to highly complex multi-player games with complex mapping requirements. Gives the developer a high level of control and doesn't try to force you into a specific one-size-fits-all mold.

Controllers

  • Functional support for most USB and Bluetooth controllers [1] (see below).
  • Extended support for many game controllers of all types on Windows, OSX, Linux, Windows 8 Store, Windows 10 Universal, Android, iOS, tvOS, PS4, XBox One, and Webplayers. You can create additional controller definitions to support more, or if you'd like you can mail me your controller and I'll add the definitions and mail it back! :)
  • Supported controllers are recognized on each platform and are fully mapable by element name and have standardized axis directions.
  • For any controller not included, you can map an Unknown controller which includes all possible buttons/axes on the platform (Windows 128 buttons & 32 axes, etc.) Regardless of whether you define a map for this, users will always be able to manually map every element on the controller. This means support for the vast majority of USB and Bluetooth controllers. [1]
  • Controller template system so you can either choose to create default maps for every controller you wish to explicitly support, or save time and just map the template. All controllers that use that template will be mapped automatically. (Comes with a Dual Axis Gamepad template that works for the included gamepads.) User can always map any remaining controller elements even if they're not defined on the template.
  • Named buttons and controller elements for supported controllers (for help messages and config screens).
  • Vibration (Windows, OSX, Linux, XBox One, PS4 currently)
  • Advanced controller features such as vibration, touchpad, light, and gyro on the Dual Shock 4.
  • Custom Controllers - Any source can be used to drive the controller's element values. Custom Controllers can be used for on-screeen touch controllers and more.
  • Xbox 360 and Xbox One controllers supported on OSX.

Mapping

  • Powerful controller mapping system that allows you to create highly complex input schemes for any style of game.
  • Unlimited, stackable, maps per controller.
  • Maps stack so you can have as many maps for each controller as you need. For example: If you have multiple game modes such as Infantry, Tank, Airplane, you can have shared controls on one map, and mode-specific controls each on its own map. You can have even more maps as needed: A Menu map for when you're in the menus, a system map for controls like Save/Load and Quit, multiple maps for different players on the keyboard, etc.
  • Enable / disable maps as needed, for example, when changing game modes.
  • Multiple layouts per category. Allows you to have optional controller layouts.
  • A shared controller (the keyboard for example) can be mapped by any number of players with any number of maps.
  • All maps are owned by the player, so changes you make to one player's maps don't affect the others even if it's on the same controller.
  • Map axes to buttons and buttons to axes if you choose.
  • Split axes - allows you to map one pole of an axis to an action and the other pole to another action if you want.
  • Axis Contribution - you can choose how your button or axis affects the final Action's value. A button can generate positive or negative values on an Action's final axis value.
  • Save maps to XML.

Input

  • Standard Unity lingo: GetButton, GetButtonDown, GetAxis.
  • Poll for input as per Unity standard practice or use event-based input to get input without polling.
  • Input is handled through the Player class:
    player.GetAxis("actionName").
  • Get input directly from elements by index if necessary.
  • Get Action input by action name or action id.
  • Positive and negative buttons.
  • Double-press/click support with customizable timing.
  • GetButtonDown buffer -- allows you to make GetButtonDown respond for longer than a single frame to help with timing issues when user is pressing the button rapidly.
  • Keyboard modifier support - Map keyboard controls with up to 3 modifiers - Control, Alt, Shift, and Command (mac).
  • Axis calibration (min, max, zero, deadzone, sensitivity)

Players

  • Unlimited number of players.
  • Supports multiple controllers per player.
  • Convenient System player for handling system actions - Save, Load, etc.
  • Define starting maps for joystick, keyboard, and mouse per-player.

Actions

  • Define actions in the editor.
  • Create an action once and use it for as many players as you like.
  • Action categories for organizational convenience.
  • Set user-assignable flag on an Action or Action Category to allow or prevent certain actions from showing up in lists (useful for mapping screens.)

Input Behaviors

  • Input Behaviors allow you to set options for digital axis simulation (sensitivity, gravity, etc.), how to handle mouse axes, a GetButtonDown buffer, button double press speed, button dead zone, and more.
  • Each Action is assigned an Input Behavior, so if you have many actions that need to behave the same way, you don't have to duplicate the information, just set them to use the same Input Behavior.
  • Per-player, and run-time modifiable.
  • Save to XML.

Map categories

  • Categorize your maps by any criteria you choose. For example: System, Menu, Gameplay Shared, Infantry, Vehicle, Airplane.
  • Set user-assignable flag on a category to allow or prevent user-assignment of certain controls (system controls should be protected from change, for example).
  • Category selective conflict checking - choose to conflict check some categories with other categories, but not necessarily in both directions. (Useful for complex stacked map setups).

Performance

  • Rewired is fast, written in C#, and tuned for performace.
  • ZERO bytes of memory allocated per-frame during gameplay means no garbage collection overhead.*

    * Platforms that fallback on Unity input have periodic very small allocations as it polls Input.GetJoystickNames() every second or two to detect joystick changes.

  • The vast majority of code is included in a DLL, so it won't slow down your script compilation during development.

Misc

  • Input Manager is self-contained so you can actually have separate input managers for different levels if you choose with entirely different mappings, etc. (Not necessary but interesting!)
  • Functions for mapping conflict checking.
  • Identify joysticks by button press in Unity Fallback mode.
  • Included example of mapping screen using Unity GUI (will update when new GUI system comes out) including saving and loading of maps per-player.

Limitations

  • Hot-plugging in Windows Webplayer is not possible because the Windows Unity Webplayer cannot access outside libraries. However, the rest of the features work just fine in Webplayer.
  • Rewired is not for those who want to make games with zero coding knowledge. Coding is required.

Requirements

  • Unity 4.3 or later, Free or Pro
  • OSX 10.5 or later is required for the OSX Unity editor and OSX Standalone builds.

Tested Platforms

Rewired has been tested on the following platforms. Others may work but have not been tested.

  • Windows Standalone 32-bit/64-bit*
  • Windows Webplayer
  • Windows 8 Store*
  • Windows 10 Universal 32-bit/64-bit (.NET and IL2CPP)*
  • OSX Standalone 32-bit/64-bit/Universal*
  • OSX Webplayer
  • Android
  • iOS
  • Linux*
  • Sony PSM (Sony PlayStation Vita)
  • Sony PlayStation 4* [2]
  • Microsoft XBox One* [2]
  • OUYA*
  • Apple TV (tvOS)
  • Amazon Fire TV
  • Google Nexus Player
  • Razer Forge TV
  • GameStick

* Platform features Extended Native Support

Want more information?

  • Check out the documentation to learn more about the inner-workings of Rewired.
  • 1 Controller must be compatible with underlying system. On Windows the controller must be compatible with Raw Input, Direct Input, or XInput. On OSX, it must be compatible with I/O Kit. On Linux, it must be compatible with the Linux device system. Support for exotic controller types not guaranteed.
  • 2 These platforms make use of Unity’s special platform-specific input classes which allow for much greater control over input than with just UnityEngine.Input and are functionally equivalent to native input libraries.

Integrations with Other Assets

Videos

Games Made with Rewired

Overload by Revival Productions
Shadow Tactics by Mimimi Productions and Daedalic Entertainment
Broforce by FreeLives Games and Devolver Digital
Gang Beasts by BoneLoaf, Published by Double Fine
The Long Dark by Hinterland Games
RoboCraft by FreeJam
Hive Jump by Graphite Lab
GoD Factory Wingmen by Nine Dots Studio
Divide by Exploding Tuba Studios
Marooners by M2H Game Studio
A Dragon Named Coal by Clever Crow
Tinertia by Candescent Games and Section
End Space by Justin Wasilenko
Super Slam Dunk Touchdown by Tipping Goat
Porcupine by Big Green Pillow

 

... and many more to be added soon.

Available on the Unity Asset Store!

 


Get Rewired on the Unity Asset Store
Download a Free Trial

Need Support?

If you have any questions about Rewired, don't hesitate to send a message.

Please choose one of the following options to get started: