# Troubleshooting

Topics:

- Something isn't working...
- My controller doesn't work
- Windows: XBox One controller doesn't work
- Joystick control doesn't work
- Keyboard control doesn't work
- Mouse control doesn't work
- Two or more keyboard keys cannot be pressed at the same time
- XBox 360 controller L/R triggers can't be pressed at the same time on Windows
- Joystick count is always zero on Start() even when joysticks are connected
- Compiler errors with Rewired classes such as Rewired.Player
- Null reference exception when recompiling scripts in the editor at runtime
- Unity 5 compile errors in PS4, XBox One, WiiU, or other special platforms
- Rewired is not initialized error
- Joystick axes don't work on Xbox One, PS4, Android, iOS, etc.
- Exception: "Message: Input Axis MouseAxis1 is not setup."
- Rewired works in the editor but not on Xbox One, PS4, Android, iOS, etc.
- Time comparisons to Time.time don't match
- Joystick buttons activate keyboard keys on Android
- OnGUI may return GetButtonDown/Up true for multiple frames
- When a keyboard key or D-Pad is pressed, GetAxis value ramps up/down slowly instead instantly returning 1/-1
- Some component of Rewired is missing (RewiredStandloneInputModule, Control Mapper, etc.)
- Exceptions with Steamworks.Net plugin
- Steam Controller
- Steam Controller is not detected (Windows)
- Steam Streaming controller support on Linux/SteamOS
- Steam: Sony DualShock 4 or generic gamepad doesn't work or appears as two devices
- Windows, XInput: XInput-compatible device shows up as multiple controllers
- Windows, XInput: XInput-compatible device is always connected even after disconnecting the controller and no connect or disconnect events are sent
- Windows 10 Universal: Serialization errors
- OSX: XBox One Controller vibration doesn't work
- RewiredStandaloneInputModue issues
- XBox One: Crash/blank screen on start in game build
- XBox One: High CPU usage in profiler
- High CPU usage in profiler when using Deep Profile

### 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.

### 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.

How to determine the source of the issue:

You can easily determine why your joystick is not working by looking at the Player, Joystick, and Controller Map 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.

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

### 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.

### 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. Please go through the Quick Start guide and ensure you haven't missed any steps.
6. 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.

### 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.

### 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.

### 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.keyboardEnabled = 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.keyboardEnabled = false; // Disable keyboard input on Android platform
    #endif
    }

### Exceptions with Steamworks.Net plugin

There have been two 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 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.)

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

There are many 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.

Linux
The Steam Controller can only be detected through the use of the SDL2 input library. If your game needs Steam Controller support, you must change the Linux Standalone Primary Input Source to SDL2.

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.

### Steam Controller is not detected (Windows)

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.

### Steam Streaming controller support on Linux/SteamOS

Due to the way Steam Linux works, Rewired's custom native input implementation will probably not work with Steam Streaming on Linux. However, Rewired includes the option to use SDL2 as the input source which in theory should work with Steam Streaming on Linux/SteamOS, since Steam Linux controller remapping is based on SDL2.

Steam Streaming support is currently untested on Linux/SteamOS. To choose SDL2 as your input source on Linux, choose it in the Settings page of the Rewired Input Manager. You will also need to install the SDL2 libraries. See Deployment for more information.

### Steam: Sony DualShock 4 or generic gamepad doesn't work or appears as two devices

This can happen if the user has enabled DualShock 4 configuration support or Generic Gamepad configuration suppor in Steam Big Picture mode under Settings -> Controller. 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."

Note that 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 use XInput or else your users will not be able to use these controllers when configured by Steam.

### 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: 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).

### RewiredStandaloneInputModue issues

Please see Rewired Standalone Input Module - Troubleshooting.

### 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.

### 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.

Documentation