Troubleshooting

Topics:

General:

Windows:

OSX:

Android:

Xbox One:

Steam:

 


Something isn't working...

The single most common solution to a wide variety of support questions:

  • Do you have warnings enabled in the Unity console?

Ensure warnings are enabled in the Unity console so you can see important messages created by Rewired for a variety of common situations. You should also have normal log messages and errors enabled. This can save a lot of time and back and forth questions.

Console Warnings

 


My controller doesn't work

If you're using a controller that is not listed here, your controller doesn't have a hardware definition and will not automatically be recognized and mapped. Instead, it will use the Unknown Controller map and need to be manually mapped by the user prior to use through a custom control remapping screen. Please read about the Unknown Controller map and how unrecognized controllers are handled to understand why.

My gamepad doesn't work. I created a map using the Dual Analog Gamepad Template but it doesn't work.

Just because a controller is a gamepad does not mean Rewired will recognize it as a gamepad. Just what a "gamepad" is varies from product to product. There is no universal definition of a gamepad and the device itself does not provide any kind of element layout information. The Dual Analog Gamepad Template only applies to controllers that have had definitions created for them and have been specifically assigned and configured for that template. If you want to use a gamepad that is not listed here, you either have to make a controller definition for it and add it to the Dual Analog Gamepad Template or provide your users with a control remapping screen so they can map the controls themselves.

More reasons why your controller may appear not to work:

  • You have multiple controllers connected, one Player, and have left the default Joystick Auto-Assignment Settings in the Rewired input manager: Based on the default settings, Rewired will assign only one controller per-Player. If multiple controllers are present, only one will be assigned to each Player. If you only have one Player, the second controller will be left unassigned. In order to allow auto-assignment of multiple Joysticks to the same Player, Max Joysticks Per Player must be raised to a value greater than 1. See this page for information on Controllers.

See this topic for information on how to find the source of the problem.

 


How to find the source of the problem

You can easily determine why your something is not working by looking at the Player, Joystick, Controller Map, and other objects in the Debug Information foldout in the Rewired Input Manager inspector. This shows a ton of useful information allowing you to visualize most objects in the system at runtime. For example, you can see if a Joystick has been assigned to a Player or view which Joystick Maps have been assigned and enabled.

For game builds where you do not have access to the inspector, you can use the prefab in Assets/Rewired/DevTools/DebugInformation. Drag this prefab into your scene and build. It will display on screen the same information shown in the Debug Information foldout in the inspector. Note: The main camera in your scene must have an enabled GUILayer component or no information will be visible.

You can also get this information by using a little bit of debug code. This code will show all Joysticks assigned to each Player and all mappings in each Controller Map. You will be able to tell if a Joystick is assigned to a particular Player, if any Controller Maps were loaded for that Joystick, whether or not those Controller Maps are enabled, and the what Action is bound to each element. There are many more members in each of the Player, Joystick, JoystickMap, and ActionElementMap classes that you can get useful information from.

// Log assigned Joystick information for all joysticks regardless of whether or not they've been assigned
Debug.Log("Rewired found " + ReInput.controllers.joystickCount + " joysticks attached.");
for(int i = 0; i < ReInput.controllers.joystickCount; i++) {
    Joystick j = ReInput.controllers.Joysticks[i];
    Debug.Log(
        "[" + i + "] Joystick: " + j.name + "\n" +
        "Hardware Name: " + j.hardwareName + "\n" +
        "Is Recognized: " + (j.hardwareTypeGuid != System.Guid.Empty ? "Yes" : "No") + "\n" +
"Is Assigned: " + (ReInput.controllers.IsControllerAssigned(j.type, j) ? "Yes" : "No") ); } // Log assigned Joystick information for each Player foreach(var p in ReInput.players.Players) { Debug.Log("PlayerId = " + p.id + " is assigned " + p.controllers.joystickCount + " joysticks."); // Log information for each Joystick assigned to this Player foreach(var j in p.controllers.Joysticks) { Debug.Log( "Joystick: " + j.name + "\n" + "Is Recognized: " + (j.hardwareTypeGuid != System.Guid.Empty ? "Yes" : "No") ); // Log information for each Controller Map for this Joystick foreach(var map in p.controllers.maps.GetMaps(j.type, j.id)) { Debug.Log("Controller Map:\n" +
"Category = " +
ReInput.mapping.GetMapCategory(map.categoryId).name + "\n" +
"Layout = " +
ReInput.mapping.GetJoystickLayout(map.layoutId).name + "\n" +
"enabled = " + map.enabled
); foreach(var aem in map.GetElementMaps()) { var action = ReInput.mapping.GetAction(aem.actionId); if(action == null) continue; // invalid Action Debug.Log("Action \"" + action.name + "\" is bound to \"" + aem.elementIdentifierName ); } } } }

 


Joystick control doesn't work

  1. Did you create one or more Players in the Rewired input manager?
  2. Is Auto-assign Joysticks enabled in the Rewired Input Manager Settings page or have you manually assigned joysticks to the Player(s) during runtime through scripting? (See "My Controller Doesn't Work" also.)
  3. Did you create any Joystick Maps compatible with the controller(s) you're using?
  4. Did you assign those Joystick Maps to your Player(s) on start?
  5. Are those Joystick Maps enabled on start in the Player(s)?
  6. Is the joystick you're using a recognized controller? If not, please read about the Unknown Controller map and how unrecognized controllers are handled.
  7. Please go through the Quick Start guide and ensure you haven't missed any steps.
  8. Read the documentation to learn more about how Controllers and Controller Maps work.

 


Keyboard control doesn't work

  1. Did you create one or more Players in the Rewired input manager?
  2. Did you create any Keyboard Maps?
  3. Did you assign those Keyboard Maps to your Player(s) on start?
  4. Are those Keyboard Maps enabled on start in the Player(s)?
  5. Did you check "Assign Keyboard on Start" in the Player(s) you want to have access to the keyboard or assign the keyboard manually to the Player(s) during runtime through scripting?
  6. Please go through the Quick Start guide and ensure you haven't missed any steps.
  7. Read the documentation to learn more about how Controllers and Controller Maps work.

 


Mouse control doesn't work

  1. Did you create one or more Players in the Rewired input manager?
  2. Did you create any Mouse Maps?
  3. Did you assign those Mouse Maps to your Player(s) on start?
  4. Are those Mouse Maps enabled on start in the Player(s)?
  5. Did you check "Assign Mouse on Start" in the Player(s) you want to have access to the mouse or assign the mouse manually to the Player(s) during runtime through scripting?
  6. Please go through the Quick Start guide and ensure you haven't missed any steps.
  7. Read the documentation to learn more about how Controllers and Controller Maps work.

 


Two or more keyboard keys cannot be pressed at the same time

If you find that no input value is returned when two or more keyboard keys are pressed at the same time, you are experiencing a hardware limitation of your particular keyboard called Keyboard Ghosting. This can affect any type of computer that uses a keyboard. This is not an issue with Rewired and there is no possible way to work around this issue in software because no signal is being sent from the keyboard.

 


Joystick count is zero on Start() even when joysticks are connected

Please see How To's - Receiving Joystick connect and disconnect events for important information.

 


Compiler errors with Rewired classes such as Rewired.Player

It is sometimes possible to have class names in your project that may clash with Rewired classes such as Rewired.Player. If you have a global Player class declared in your project, the compiler will prefer that globally-declared Player over the Rewired.Player even with the "using Rewired;" statement placed at the top of your script. (A globally-declared class is a class declared outside of any namespace.)

If you receive a compiler error such as the following, you have a globally-declared class, interface, struct, or enum that clashes with a Rewired class name:

Assets/Scripts/MyScript.cs(16,9): error CS0029: Cannot implicitly convert type `Rewired.Player' to `Player'

In general, it is very bad practice to have any classes declared globally. Unfortunately, the vast majority of Unity users, including many who sell assets on the Unity Asset Store, do not use namespaces. Therefore, there is a high probability of class name clashes. If you do not know what namespaces are, read about them on MSDN here.

In these cases, if you have a class that clashes with a Rewired class, it is best to use the fully-qualified name of the Rewired class in your script such as Rewired.Player instead of just Player.

This example shows how to explicitly declare the Rewired.Player class to avoid clashes:

using UnityEngine;
using Rewired;

public class MyClass {
    public Rewired.Player rewiredPlayer; // explicit declaration of the fully-qualified class name to avoid clashes with global Player classes.
}
You can also move the "using Rewired;" statment from the top of your script to inside your namespace declaration (provided you are using a namespace for your class) like this:
using UnityEngine;

namespace MyNamespace {
    using Rewired; // this declaration will make Rewired classes take precedence over any global classes of the same name

    public class MyClass {
        public Player rewiredPlayer; // no more clash because Rewired.Player is higher priority than ::Player (global)
    }
}
You can also make a single class take precedence over any global class with the same name like this:
using UnityEngine;
using Rewired;
using Player = Rewired.Player;  // this declaration will make Rewired.Player take precedence over a global Player class

public class MyClass {
    public Player rewiredPlayer; // no more clash because Rewired.Player is higher priority than ::Player (global)
}


Null reference exception when recompiling scripts in the editor at runtime

NOTE: This information only applies to runtime recompiling in the editor while in Play mode. If you don't need this functionality, you do not need to do any of the following.

Null reference exceptions thrown during a recompile are a result of a script not checking if Rewired is ready before attempting to access properties or methods of the ReInput class.

If your workflow requires that you edit scripts during runtime, you should be aware that once recompile is triggered, the main Rewired managing class is destroyed and recreated. All Player, Controller, and other references are no longer valid. Due to the sheer complexity of Rewired (native input for example), runtime data is not serialized and therefore seamless resuming from a runtime recompile is not supported (see below for details). To prevent your scripts from throwing null reference exceptions when you recompile during runtime, you should be checking ReInput.isReady to determine if the system is initialized at the beginning of your input update.

Code patterns that survive runtime recompiles:

Pattern 1: Get Rewired Player every update

using UnityEngine;
    using Rewired;
     
    public class RecompileTest : MonoBehaviour {
     
        void Update () {
            if(!ReInput.isReady) return; // check if Rewired is ready (if false, editor is compiling)

            // Do input processing
            Player p = ReInput.players.GetPlayer(0); // get the Player object every update
            Debug.Log(p.GetButton("Fire"));
        }
    }
  1. By checking ReInput.isReady at the beginning of the update and exiting if it's not ready, you avoid null references while Unity is recompiling.
  2. Never make any calls to any Rewired classes while the editor is recompiling (ReInput.isReady == false).
  3. By getting the Player every update and not storing it, you don't have to worry about it going out of scope after a recompile.

Pattern 2: Caching Rewired Player

This pattern allows you to cache your Player object on Awake and not have to get the Player each update. However, when recompiling, you must get a new reference to the Player object after compiling is finished because the original object is no longer valid.

public int playerId = 0;
private Rewired.Player player;
private bool isRecompiling;
 
void Awake() {
  CacheRewiredPlayer();
}
 
void Update() {
    GetInput();
}
 
void GetInput() {
#if UNITY_EDITOR
    if(IsCompiling()) return; // exit during recompile
#endif
 
  float value = player.GetAxis("MyAxis");
}
 
bool IsCompiling() {
    if(!ReInput.isReady) {
        isRecompiling = true;
        return true;
    } else if(isRecompiling) {
        isRecompiling = false; // just finished recompiling
        CacheRewiredPlayer(); // get the new Player object after recompile
    }
    return false;
}
 
void CacheRewiredPlayer() {
  // Store the Player object
  player = ReInput.players.GetPlayer(playerId);
}

The #if UNITY_EDITOR preprocessor directive was added because there is no need to check for recompiling in a build since this isn't possible.

 


Unity 5 compile errors on PS4, XBox One, WiiU, or other special platforms

Assets/Rewired/Internal/Scripts/InputManager.cs(5,15): error CS0234: The type or namespace name `Utils' does not exist in the namespace `Rewired'. Are you missing an assembly reference?

Assets/Rewired/Internal/Scripts/InputManager.cs(6,15): error CS0234: The type or namespace name `Platforms' does not exist in the namespace `Rewired'. Are you missing an assembly reference?

Both Utils and Platforms are namespaces in Rewired_Core.dll.

Unity added the ability to designate what platforms DLLs compile to in Unity 5 by setting check boxes on the DLL in the inspector for each platform. Rewired_Core.dll comes with all options checked except Windows App Store. Special versions of Unity add checkboxes for that specific platform (PS4 for example). That special platform check box is not and cannot be automatically checked by Rewired because it is built on a standard Unity 5 build that does not contain these special platforms.

To fix this, simply click on Rewired/Internal/Libraries/Runtime/Rewired_Core.dll and check the appropriate platform checkbox in the inspector.

 


Rewired is not initialized error

If you see the following error at runtime in the log:

"Rewired is not initialized. Do you have a Rewired Input Manager in the scene and enabled?"

There are only 3 reasons you could get this error:

  1. There is no enabled Rewired Input Manager in the scene.
  2. You canceled the installation process when Rewired tried to install itself and the Script Execution Order was not set causing Rewired to run after your other scripts and therefore it cannot initialize before you try to call it.
  3. The Script Execution Order that Rewired sets during installation was changed or removed by some other asset that was installed. This can happen with assets that contain an entire project. These assets will warn you before installation that they will overwrite the entire project.

The solution to #1 is to add a Rewired Input Manager to the scene.

The solution to #2 and #3 is to re-run the Rewired installation script by going to the menu:

  • Window -> Rewired -> Setup -> Run Installer

Proceed with the installation and Rewired will set its Script Execution Order.

 


Joystick axes don't work on Xbox One, PS4, Android, iOS, etc.

Please see the following topic.

 


Exception: "Message: Input Axis MouseAxis1 is not setup."

Rewired was not installed properly (canceled during installation) preventing it from installing the Unity Input Manager entries necessary for supporting input on Unity fallback platforms and for getting mouse input when Native Mouse Handling is unavailable or disabled. Another possible cause is that these entries were deleted by some other asset installed after Rewired. This can happen with assets that contain an entire project. These assets will warn you before installation that they will overwrite the entire project. It can also happen if the asset contains its own Input Manager settings and overwrites the file instead of adding entries to it.

The solution is to re-run the Rewired installation script by going to the menu:

  • Window -> Rewired -> Setup -> Run Installer

Proceed with the installation and Rewired will add the necessary Input Manager entries.

 


Rewired works in the editor but not on Xbox One, PS4, Android, iOS, etc.

If Rewired works in the editor but not on certain platforms, check the log file. The logs will tell you if Rewired was unable to initialize or any other errors that may have occurred.

The most common reason for this issue is that Rewired was not installed properly (canceled during installation) preventing it from installing the Unity Input Manager entries necessary for supporting input on Unity fallback platforms. Another possible cause is that these entries were deleted by some other asset installed after Rewired. This can happen with assets that contain an entire project. These assets will warn you before installation that they will overwrite the entire project. It can also happen if the asset contains its own Input Manager settings and overwrites the file instead of adding entries to it.

The solution is to re-run the Rewired installation script by going to the menu:

  • Window -> Rewired -> Setup -> Run Installer

Proceed with the installation and Rewired will add the necessary Input Manager entries.



Time comparisons to Time.time don't match

When doing time comparisons to the current time from methods such as Controller.GetLastTimeActive(), you must compare current time based on ReInput.time.unscaledTime, not Time.time or Time.unscaledTime as Rewired always uses its own unscaled time calculation for all input for better accuracy in the various update loops. Do not compare against Time.unscaledTime as this is not always in perfect sync with Rewired's unscaled time.

 


OnGUI may return GetButtonDown/Up true for multiple frames

Due to the unpredictable order of OnGUI Repaint updates even with Script Execution Order set, Rewired has no way of being guaranteed to run first OnGUI Repaint events. Therefore, it is impossible to guarantee the input system will be able to update itself in the Repaint event before another script with an OnGUI call updates. Input may not yet be updated in the frame in which you are calling GetButtonDown from an OnGUI Repaint event and you may get the last frame's value (the value generated in the Layout event) for GetButtonDown. The end result is you may receive GetButtonDown or GetButtonUp multiple times in a row -- once in the Layout event and again in the Repaint event. In order to avoid this issue, only check for input in the Layout event as shown in the following example:

void OnGUI() {
    if(Event.current.type == EventType.Layout) {
        if(player.GetButtonDown("MyAction")) {
            // do something
        }
    }
}

 


When a keyboard key or D-Pad is pressed, GetAxis value ramps up/down slowly instead instantly returning 1/-1

You have left the default Input Behavior Digital Axis settings. Please read the documentaion on Input Behaviors.

Digital Axis Settings:
These settings allow buttons and keyboard keys to be treated like axes and return values ranging from -1 to 1 instead of just True and False as is the usual case. This allows you, for instance, to have smooth character movement when using the keyboard for movement controls. The GetAxis value of the Action can be smoothed over time based on the Digital Axis Settings (gravity and sensitivity). See Rewired Editor - Input Behaviors for more information about each setting.

The default values have been set to mimic Unity's default Gravity and Sensitivity settings.

To get an instant on/off value for a keyboard key, do one of the following:

  • Disable Digital Axis Simulation in the Action's Input Behavior.
  • Use player.GetButton and player.GetNegativeButton instead of GetAxis when getting the value of the Action.
  • Use player.GetAxisRaw instead of GetAxis when getting the value of the Action.

 


Some component of Rewired is missing (RewiredStandloneInputModule, Control Mapper, etc.)

If a component of Rewired is missing from the installation:

  1. Check to make sure you have the latest version of Rewired installed. Go to the menu:
    Window -> Rewired -> Help -> About
  2. Make sure the version of Unity you are using is compatible with that component. For example, to use the RewiredStandaloneInputModule or Control Mapper, you must be using Unity 4.6+.
  3. If neither 1 or 2 apply, then the file may have been deleted or not allowed to install. Make sure Rewired is in the root project Assets/ folder first, then re-run the installer script from the menu:
  4. Window -> Rewired -> Setup -> Run Installer
    And allow the installer to install. This will not destroy any of your input configuration data which is stored in the Rewired Input Manager game object, not in the Rewired project folder.
  5. If the files are still missing, delete and reinstall Rewired from the Unity Asset Store. First, delete the entire Rewired folder from the project. This will not destroy any of your input configuration data which is stored in the Rewired Input Manager game object, not in the Rewired project folder. Then re-install Rewired from the Unity Asset Store.
    Important: After deleting the Rewired folder DO NOT save your scene or project until after you have re-installed Rewired. If you save your scene or project while Rewired is deleted, serialzed data on gameobjects in your scene may be erased by Unity because the Rewired classes no longer exist. Once Rewired is re-installed, it should be safe to save your scene, but it would be safer to quit and restart Unity before doing so.

 


RewiredStandaloneInputModue issues

Please see Rewired Standalone Input Module - Troubleshooting.

 


High CPU usage in profiler when using Deep Profile

Deep Profile is notoriously inaccurate when dealing with deep levels of nested method calls because it uses reflection to get method names and such. Profile your game with Deep Profile disabled and you will see a massive increase in speed.

 


 

Windows

Windows: XBox One controller doesn't work

Most often this is caused by creating a Joystick Map specifically for the Xbox One controller when Use XInput is enabled instead of using the Dual Analog Gamepad Template. See Controller Maps - Special Considerations for XInput gamepads on Windows Standalone, Windows App Store, and Windows 10 Universal.

 


XBox 360 controller L/R triggers can't be pressed at the same time on Windows

This is a design issue with the Microsoft XBox 360 controller driver. The XBox 360 controller driver only returns a single byte of data for both the left and right triggers making it impossible to distinguish the two when both are pressed simultaneously when using Raw Input or Direct Input. You can read about this issue and the reasoning behind the design here.

The solution is to enable XInput in the Rewired Editor - Settings. XInput is able to treat the triggers as separate values.

 


Windows, XInput: XInput-compatible device shows up as multiple controllers

If Use XInput is enabled and you are seeing multiple XInput devices in Rewired when only one controller is plugged in:

If you are seeing multiple devices named "XInput Gamepad 1", "XInput Gamepad 2", etc:
Multiple XInput devices showing up can only be caused at the Windows driver level. Rewired queries XInput.dll directly to get the list of connected XInput devices 0-3. There is no intermediary step involved. Therefore, your
XInput device is showing up as 2 devices in XInput itself, not Rewired. This is almost always caused by a driver creating multiple devices. Check Windows Device manager for multiple XInput devices under HID and Xbox Peripherals and elsewhere. Uninstall one or all of these drivers, reboot, and try agiain. Another possible cause is if you have a 3rd party tool that creates emulated XInput devices such as DS4Win, PS3 SCP driver, or other tools that emulate XInput devices. Uninstall these tools/drivers and try again.

If you are seeing multiple devices, one named "XInput Gamepad 1" and one named something else like "Controller (XBOX One For Windows)":
This error can only happen if the XInput-compatible device does not conform to Microsoft's documented standards for how XInput devices identify themselves. If the device deviates from these standards, Rewired will be unable to filter out XInput devices when it populates its Raw Input or Direct Input device list. This causes it to create both a Raw Input / Direct Input device and an XInput device. The only way to fix these problem devices is to add special case code to manually filter them out individually. Report this device via the support form on the website and include all relevant controller information shown by the Rewired/DevTools/JoystickElementIdentifier tool. (Create a new scene, add the JoystickElementIdentifier tool to the scene at 0, 0, 0, add an empty Rewired Input Manager, and press Play.) To include a screenshot, please include a link to the image on a filesharing service such as Dropbox.

 


Windows, XInput: XInput-compatible device is always connected even after disconnecting the controller and no connect or disconnect events are sent

The most common cause is that you have a 3rd party tool that creates emulated XInput devices such as the PS3 SCP driver or other tools that emulate XInput devices. Uninstall these tools/drivers and try again. This issue occurs at the driver level and is not related to Rewired.

 


Windows 10 Universal: Serialization errors

If you get errors when building the UWP project in visual studio like the following:

InvalidCastException: Unable to cast object of type
'Rewired.Data.Mapping.HardwareJoystickMap' to type
'UnityEngine.IUnitySerializable'.
   at UnityEngine.Internal.Types.$UnityType4390.$Invoke0(Int64
instance, Int64* args)
   at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance,
Int64* args, IntPtr method) 
(Filename:  Line: 0)

It is caused by the Rewired_Core.dll version being out of sync with the main Rewired_Core.dll used in the editor.

There are several things you can to do:

  • Try reinstalling the Windows UWP libraries in the Unity editor as shown here.
  • Clear all cached files in Visual Studio
  • Make sure the version of Rewired_Core.dll copied to the Visual Studio project matches the version in Unity in the Rewired\Internal\Libraries\Runtime\UWP folder. (The one you would compare to depends on if you're using the .NET or IL2CPP scripting backend.)

 


 

OSX

OSX: XBox One Controller vibration doesn't work

In order for vibration to work on the Xbox One Controller on OSX, the input source must be set to Native and you must have this driver installed (at least v0.16).

 


OSX, Mac App Store: Joysticks don't work

To access USB or Bluetooth devices in the Mac App Store sandbox, your application must request specific entitlements.

Enable the follow entitlements for your application:

  • com.apple.security.device.bluetooth
  • com.apple.security.device.usb

See the Mac App Store entitlements documentation for more information.

 


 

Android

Joystick buttons activate keyboard keys on Android

Rewired uses Unity input as the input source in Android so it is subject to its limitations. Most Android joysticks return keyboard keycode values for certain buttons on the controller such as Left Shoulder (Left Shift), Right Shoulder (Right Shift), Back (ESC), Menu (Menu), etc. These keyboard values can be in additon to or instead of a joystick button value. This can be problematic if you've developed your game for both desktop PCs and Android and have keyboard maps already set up for the desktop and you want to use the same input scheme for an Android build. When you press one of these buttons, if it also has an Action assigned through a keyboard map, you may get 2 values returned -- one for the keyboard map and one for the joystick map.

An easy way to prevent this is to set ReInput.controllers.Keyboard.enabled = false to disable all keyboard input on Android. Special provision has been made for certain Android keycodes used by most joysticks such as Back and Menu so that these will still work when activated by a joystick. In addition to solving this issue, disabling keyboard input improves performance slightly. Note that on Android, even when disabling keyboard support certain keys will still function in order to still be able to support certain buttons on joysticks that return keyboard keycodes such as the Back button.

You can disable keyboard support per-platform on the Rewired Editor - Settings page or through scripting as shown below.

void Awake() {
#if UNITY_ANDROID && !UNITY_EDITOR
    Rewired.ReInput.controllers.Keyboard.enabled = false; // Disable keyboard input on Android platform
#endif
}

 


 

Xbox One

XBox One: Crash/blank screen on start in game build

This is always due to improper setup of the required dependencies. See Special Platform Support - XBox One for details on setting up the required dependencies.

 


XBox One: High CPU usage in profiler

Debug builds on Xbox One show ridiculously high CPU usage from InputManager_Base.Update, sometimes as high as 28 ms. On Development builds the CPU usage is much, much lower.

Set Build Type to "Development Build" to avoid the huge debug overhead when profiling.

 


 

Steam

Exceptions with Steamworks.Net plugin

There have been several reports of exceptions being thrown during Rewired's initialization on Windows with the Steamworks.Net Unity plugin. Thus far, the only information I have is that Steamworks may be setting up a hook that intercepts all external calls and routes them through its callback dispatcher system. When Rewired tries to initialize Raw Input, Steamworks intercepts the call and throws an exception. This is an issue with Steamworks/Steam and not Rewired. Based on reports, it appears to only happen when Steamworks is initialized and certain methods are called before instantiating and initializing Rewired. (I have been unable to reproduce this issue myself thus far.)

There have also been reports of this issue happening when Steam is launched in Big Picture Mode and not in the normal mode.

Until I receive a reliable repro case where I can determine exactly what Steamworks is doing and find a workaround if one exists, the only solution is to always initialize Rewired first before Steamworks. This means you must have your Rewired Input Manager in your scene before your Steamworks manager is spawned and initialized and never destroy that Rewired Input Manager for the duration of runtime. (Don't Destroy on Load is checked by default on the Rewired Input Manager.)

To be on the safe side, make sure you avoid ever destroying or shutting down the Rewired system so it never has to do any setup after Steam has already been intialized. This also means you should never change input sources through ReInput.configuration in-game after Steam has been initialized because changing it causes Rewired to Reset. Also never call ReInput.Reset() which will also cause Rewired to do all its setup again.

There are many, many currently games on Steam that use Rewired with no issues whatsoever.

 


Steam Controller

All Platforms
Native Steam Controller support is not available at this time. Direct support of the controller's special features is not currently available. The Steam Controller can only be supported through Steam's automatic emulation of a standard controller (type varies by platform.)

Windows
The Steam Controller automatically emulates an XInput gampad (XBox 360) on Windows and is supported as an XInput gamepad only at the present time. You must enable Use XInput in the Windows settings to support the Steam Controller, Steam Streaming, and Steam Link.

OSX
As of Rewired 1.1.5.0, the Steam Controller, Steam Link, and Steam Streaming work properly using the default Native input source. It is recommended that you leave the input source set to Native for the best device support.

Linux
The Steam Controller, Steam Link, and Steam Streaming all work properly using the default Native input source. It is recommended that you leave the input source set to Native for the best device support.

IMPORTANT NOTE
The Steam Controller is not a standard HID device and cannot be seen by the OS without Steam being initialized for your process through the Steam API with Steam running in the background. It is not possible to use the Steam Controller without Steam. Rewired does not initialize Steam for you -- you will have to do so using the Steam API or a C# Steam library such as Steamworks.net.

See Best Practices - Steam for recommended guidelines for Steam.

 


Steam Controller is not detected

Windows: (See this topic for information on each OS.)

The Steam Controller automatically emulates an XInput gampad (XBox 360) on Windows and is supported as an XInput gamepad. You must have "Use XInput" enabled in the Rewired Input Manager - Settings page or the Steam Controller will not be detected. (XInput can only be used in conjunction with Raw Input or Direct Input, not Unity Input. Further, Disable Native Input must not be checked.) In addition, Steam must be initialized through the Steam API before the Steam Controller can be detected as an XInput device.

See Best Practices - Steam for recommended guidelines for Steam.

 


Steam Streaming / Steam Link controller support

Steam Streaming and the Steam Link only work with XInput-compatible devices (XBox 360, XBox One, Logitech F310, etc.) and the Steam Controller. It is not possible to use Raw Input or Direct Input devices with Steam Streaming unless Steam has specifically added XInput emulation support for this device. This is not a limitation of Rewired, it is a limitation of Steam.

Windows
Steam Streaming and Steam Link create a controller that emulates an XInput gampad (XBox 360) on Windows and is supported as an XInput gamepad only at the present time. You must enable Use XInput in the Windows settings to support the Steam Controller, Steam Streaming, and Steam Link. Note: When using XInput devices with XInput enabled, Windows is limited to a maximum of 4 devices. This is a limitation of XInput, not Rewired. See this for information on supporting more than 4 XInput devices.

OSX
As of Rewired 1.1.5.0, the Steam Controller, Steam Link, and Steam Streaming work properly using the default Native input source. It is recommended that you leave the input source set to Native for the best device support.

Linux
The Steam Controller, Steam Link, and Steam Streaming work properly using the default Native input source. It is recommended that you leave the input source set to Native for the best device support.

See Best Practices - Steam for recommended guidelines for Steam.

 


Steam (Windows): Sony DualShock 4, generic gamepad, or other joystick doesn't work or appears as two devices

See this for duplicate controllers on OSX/Linux.

This can happen if the user has enabled PS4 Configuration Support or Generic Gamepad Configuration Support in Steam Big Picture mode under Settings -> Controller or in the main Steam interface in the menu Steam -> Settings -> Controller -> General Controller Settings. Disable PS4, Xbox, and Generic Gamepad Configuration Support to prevent Steam from modifying controller layouts or creating emulated XInput devices for these devices.

Steam Big Picture controller configuration support

These settings conflict with the Rewired setting "Use Steam Raw Input Fix" which existed in Rewired versions below 1.0.0.112. The fix was removed because it no longer works due to changes to Steam. If you are experiencing this issue, update to the latest version of Rewired or disable the option in the Rewired Input Manager under Settings -> Windows -> "Use Steam Raw Input Fix."

Even without the old Raw Input fix enabled, some devices may not work at all when Generic Gamepad Configuration Support is enabled in Steam. This option causes Steam to try to create an emulated XInput device for the attached controller. Note that this setting applies to ALL controllers including flight sticks, etc., attached to the system, not just gamepads. This setting frequently makes controllers simply non-functional because Steam is unable to create a working emulated XInput device for it but it still blocks Raw/Direct Input from seeing the device. The result is Rewired sees a dead XInput device and the user gets no input.

Note that on Windows, Steam creates an emulated XInput device for all controllers for which Steam configuration support is enabled. Steam will then block access to and hide the Raw Input device when this option is enabled. Because of how Steam works, this means that your game must enable Use XInput or else your users will not be able to use these controllers when configured by Steam.

The above setting is up to the end-user to set properly in their own Steam configuration. The Steam developer back-end also has a setting entitled Steam Configurator for Third-Party Controllers which is a duplicate of the above settings, but overrides the end-user's settings for each option if enabled. Note that while this option overrides the end-user's settings if the setting is enabled forcing the option to be enabled even if the end-user disables it, it cannot override in the negative meaning if the end-user has the option enabled in their control panel, the developer setting cannot disable it.

Flight joysticks, racing wheels, and other devices will cease to function entirely if Generic Gamepad Configuration Support is enabled. Other devices may only partially work having certain elements like D-Pads that do not function. Allowing Steam to configure these controllers allows the user to remap their controls within Steam's interface. Allowing the user to remap their controls within Steam while also providing an in-game remapping system will lead to incorrect element identification in-game as the user may have rebound the A button to the Y button for example and there is no way for Rewired to know this. For any of the following reasons, it is recommended you disable support for Steam configuration of controllers in the Steam back-end and inform your users to disable this option in the Steam Big Picture controller configuration settings:

  • If your game needs to support more than just gamepads.
  • If your game needs to support more than 4 players at once. (XInput is limited to 4 controllers and if Steam is allowed to force gamepads to be XInput devices, there will be a hard limit of 4 controllers.)
  • If you provide a means of remapping controls in-game so there aren't two competing remapping systems.
  • If you want to support all the recognized gamepads or other devices Rewired supports. When Steam takes over and turns devices into XInput devices, Rewired cannot see these devices anymore as HID devices and instead just sees XInput devices. In current testing, there are a number of devices that Steam either does not support (meaning a dead XInput device) or supports improperly (has certain broken elements).

Note that even with Steam controller configuration disabled, Steam Streaming and Steam Link will still work properly provided you have enabled support for XInput.

See Best Practices - Steam for recommended guidelines for Steam.

 


Steam (OSX/Linux): Some controllers appear as two controllers

Some controllers may appear as two controllers on OSX and Linux when using Steam. This is due to the fact that Steam creates an additional device for each controller that it recognizes and is allowed to configure. This includes Xbox controllers, Sony DualShock 4, and potentially all gamepads depending on the user's settings in Steam for controller configuration and the game's default Steam developer back-end settings for the Steam Configurator for 3rd party controllers. If a controller is allowed to be configured by Steam, it will create a new device emulating an Xbox controller. Steam does not hide or disable the original controller so Rewired sees both controllers and both will provide input. It is possible to prevent Steam from creating the emulated Xbox controller by disabling Xbox, PS4, and Generic Gamepad Configuration Support in the Steam developer back-end. However, if the user has enabled Steam controller configuration in their local settings, the developer back-end default settings cannot disable it.

There currently is no way to detect this and no automatic solution to this issue, so you should always provide a way for your users to assign and unassign controllers to Players manually so they can un-assign one of the two duplicate controllers should this situation arise.

Note that even with Steam controller configuration disabled, Steam Streaming and Steam Link will still work properly provided you are using the correct input source for the platform in question.

See Best Practices - Steam for recommended guidelines for Steam.