Known Issues
Topics:
- Running in a Sandbox
- Windows App Store support not working in Unity 5.0.0, fixed in 5.0.1
- Android remotes are not detected (Nexus Player, Amazon Fire TV, Razer Forge TV, etc.)
- Keyboard keys stuck on Linux in Unity 5.1.1
- Compiler error in 5.1.2 patch releases
- IL2CPP: _p0_marshaled': undeclared identifier error on Unity 5.3.2p1, 5.3.2p2
- iOS/tvOS: Game controllers not detected
- SDL2: OSX - Editor does not support haptic feedback
- SDL2: OSX - Xbox 360 Controller does not support vibration
- SDL2: Windows - XBox 360 Controller does not allow independent control of vibration motors
- Steam Streaming / Steam Link: Windows Standalone
- Apple TV Siri Remote gyroscope does not work
- Windows Standalone: XInput devices on Windows appear as "XInput Gamepad"
- Windows Standalone: All XInput devices use the Xbox 360 Controller map when "Use XInput" is enabled
- More than 4 XBox controllers cannot be used at the same time
- Windows Standalone: XBox One controller causes system crash when removed when using Raw Input on Windows 10
- Windows Standalone: XBox One controller has incorrect mapping on Windows XP, Vista, 7, and 8 when using Unity fallback input
- Windows 10 Universal IL2CPP: Crash when disconnecting controllers
Running in a Sandbox
Windows (tested with Sandboxie):
- Due to a lack of permissions, Rewired is unable to receive device information from Raw Input when run inside a sandbox. Joysticks will not work properly in Raw Input mode. (As a note, Unity itself is also unable to receive this information, rendering joystick support in Unity broken under the default security settings.)
- Direct Input mode is able to receive joystick input, but joystick plug/unplug notifications are blocked, so hot-plugging does not work properly even in Direct Input mode.
Windows App Store support not working in Unity 5.0.0, fixed in 5.0.1
Due to a new bug introduced in Unity 5.0.0, Rewired is unable to be compiled in this version of Unity. The bug was fixed in Unity 5.0.1, so upgrade to 5.0.1 if you need Windows App Store support.
Android remotes are not detected (Nexus Player, Amazon Fire TV, Razer Forge TV, etc.)
These remotes may not work on versions of Unity 5.02 or greater. Unity introduced a new bug in this version that makes the remote appear with a NULL name in the Input.GetJoystickNames array, which also happens to be used to fill the array entry when a controller is no longer connected. There is no way to identify these remotes because of this. The bug still exists as of 5.3.4f1. It has been reported and this information will be updated if a fix is issued.
The remotes will however still return keycodes through UnityEngine.Input. Most remotes use the keyboard arrow keycodes for movement. In addition, there are various workarounds possible using Custom Controllers such as shown in the following code example:
// Copyright (c) 2016 Augie R. Maddox, Guavaman Enterprises. All rights reserved. /* Unity has a significant bug that prevents remotes from being recognized and handled as joysticks in Rewired. Therefore, the only workaround is to read the remote as (mostly) keyboard keys through UnityEngine.Input directly and feed this input to a Custom Controller. This script will read keyboard keys and Joystick Button 0 (on all joysticks) to determine the values to feed into the Custom Controller. To Use: 1. Create a gameobject in the scene and assign this component to it and set the Player Id in the inspector. 2. Create a Custom Controller in the Rewired Input Manager with 8 buttons and 0 axes. 3. Asssign the Custom Controller to your Player and give it the tag "AndroidRemote". 4. Create a Custom Controller Map assigning Actions to each button. 5. Assign the map to your Player. The element order is as follows: Button 0 = Up Button 1 = Down Button 2 = Left Button 3 = Right Button 4 = Center button Button 5 = Back button Button 6 = Menu button Button 7 = Select button */ using UnityEngine; using System; using Rewired; public class RewiredCustomController_AndroidRemote : MonoBehaviour { public int playerId; private const string controllerTag = "AndroidRemote"; private const int buttonCount = 8; private const int axisCount = 0; private Rewired.CustomController controller; [NonSerialized] // Don't serialize this so the value is lost on an editor script recompile. private bool initialized; private void Awake() { Initialize(); } private void Initialize() { #if UNITY_ANDROID // Find the controller we want to manage Rewired.Player player = Rewired.ReInput.players.GetPlayer(playerId); // get the player controller = player.controllers.GetControllerWithTag(controllerTag); // get the controller if(controller == null) { Debug.LogError("A matching controller was not found for tag \"" + controllerTag + "\""); return; } // Verify controller has the number of elements we're expecting if(controller.buttonCount != buttonCount || controller.axisCount != axisCount) { // controller has wrong number of elements Debug.LogError("Controller has wrong number of elements!"); return; } // Subscribe to the input source update event so we can update our source element data before controllers are updated Rewired.ReInput.InputSourceUpdateEvent += OnInputSourceUpdate; #endif initialized = true; } #if UNITY_EDITOR // This is just to handle re-initialization in the editor when recompiling at runtime private void Update() { if(!Rewired.ReInput.isReady) return; // Exit if Rewired isn't ready. This would only happen during a script recompile in the editor. if(!initialized) Initialize(); // Reinitialize after a recompile in the editor } #endif private void OnInputSourceUpdate() { GetSourceButtonValues(); } private void GetSourceButtonValues() { // Get values from the keyboard and joysticks controller.SetButtonValue(0, Input.GetKey(KeyCode.UpArrow)); controller.SetButtonValue(1, Input.GetKey(KeyCode.DownArrow)); controller.SetButtonValue(2, Input.GetKey(KeyCode.LeftArrow)); controller.SetButtonValue(3, Input.GetKey(KeyCode.RightArrow)); controller.SetButtonValue(4, Input.GetKey(KeyCode.JoystickButton0)); // Center button - Must use Joystick Button 0 on ALL joysticks because there's no way to know which joystick if any is the remote because of Unity's bug! controller.SetButtonValue(5, Input.GetKey(KeyCode.Escape)); // Back controller.SetButtonValue(6, Input.GetKey(KeyCode.Menu)); // Menu controller.SetButtonValue(7, Input.GetKey(KeyCode.KeypadEnter)); // Select } }
Keyboard keys stuck on Linux in Unity 5.1.1
This is not a Rewired issue, it's a Unity bug:
http://forum.unity3d.com/threads/unity-5-1-1-broke-input-for-linux-standalone.335113/
Update to Unity 5.1.2 to fix it.
Compiler error in 5.1.2 patch releases
Unity made an undocumented breaking change to UnityEngine.EventSystems.PointerInputModule.GetMousePointerEventData(). It now requires int id to be passed. This cannot be fixed automatically in my code until Unity 5.1.3 is released because there is no way to detect a patch version before compile.
More information and a patch:
http://forum.unity3d.com/threads/rewired-advanced-input-for-unity.270693/page-20#post-2216921
IL2CPP: _p0_marshaled': undeclared identifier error on Unity 5.3.2p1, 5.3.2p2
Unity's 5.3.2p1 patch introduced a new IL2CPP error when building Rewired_Core.dll. This affects all platforms that use IL2CPP including iOS and Windows 10 Universal (IL2CPP scripting backend).
This is not an error in Rewired and there is no workaround for it. The only solution is to revert back to Unity version 5.3.2f1. Unity has announced the bug will be fixed in 5.3.2p3. More details can be found here.
iOS/tvOS: Game controllers not detected
In Unity versions 5.3.0+, game controllers no longer work in Unity because the XCode project Unity builds does not automatically reference the required GameController framework.
Solution: Manually add a reference to the GameController or GameKit framework in XCode.
More details of this issue and the solution can be found here.
SDL2: OSX - Editor does not support haptic feedback
Due to a bug in SDL/Unity that causes an editor crash when enabled, haptic feedback (vibration) is not supported in the OSX Editor.
Note: This issue only applies if SDL2 is selected as the input source for OSX Standalone builds.
SDL2: OSX - XBox 360 Controller does not support vibration
SDL2 does not provide vibration support for the XBox 360 Controller on OSX.
Note: This issue only applies if SDL2 is selected as the input source for OSX Standalone builds.
SDL2: Windows - XBox 360 Controller does not allow independent control of vibration motors
SDL2's haptic feedback system only accounts for a single motor for rumble devices.
Note: This issue only applies if SDL2 is selected as the input source for Windows Standalone builds.
Steam Streaming / Steam Link: Windows Standalone
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. This is not a limitation of Rewired -- it is a limitation of Steam.
Also, when using XInput devices, Windows is limited to a maximum of 4 devices. Again, this is a limitation of XInput, not Rewired.
Apple TV Siri Remote gyroscope does not work
The Apple TV SDK does not expose the raw gyroscope data and thus it is unavailable. The only data that is avalilable is the gravity vector and user acceleration.
Windows Standalone: XInput devices on Windows appear as "XInput Gamepad"
On Windows, with Use XInput enabled, there's no way to differentiate one XInput controller type from another. To XInput, everything is simply Gamepad with an id of 0-3. This is not a Rewired issue, it is a design decision by Microsoft.
There is no possible way to associate an XInput id to the matching HID device to get its name and make it be recognized as a specific controller. Because of this, you cannot identify an XInput controller by name in Windows when XInput is enabled. This also affects which controller maps are loaded for this joystick in Windows when using XInput. Since the device is simply and Xinput device, it will be loaded from the XBox 360 controller definition, not the Logitech F310, for example.
(However, if you create your controller maps using the Dual Analog Gamepad Template, you don't even need to worry about this.)
The only way you will be able to identify these controllers by name is to disable Use XInput in the Rewired Input Manager. Once you do that, you introduce new issues/limitations:
- L/R triggers are treated as 1 combined axis and both cannot be pressed simultaneously without canceling each other out.
- You lose universal XInput controller support because each XInput controller now must be specifically recognized and mapped. Any unrecognized XInput devices will be treated as Unknown Controllers.
- Vibration is not supported without XInput enabled.
Windows Standalone: All XInput devices use the Xbox 360 Controller map when "Use XInput" is enabled
As explained in the previous topic, when Use XInput is enabled, there is no way to differentiate one XInput device from another by name or product/vendor id. Therefore, all XInput devices will use the Xbox 360 Controller map on Windows when Use XInput is enabled. This will match all XInput devices, generic or not, and will provide full coverage of all XInput devices. You cannot map these devices based on the individual device type such as Xbox One or Logitech F310 when using XInput because the device cannot be identified as as specific device type but rather simply as an XInput gamepad. All XInput gamepads will use Xbox 360 Controller profile when Use XInput is enabled.
If you disable Use XInput, you will get device-specific identification and recognition, but you will also have the drawbacks explained in the previous topic.
There is rarely ever a need to map these controllers individually by using the specific device-type maps. Just create your Joystick Map using the Dual Analog Gamepad Template and it will cover all gamepads listed here regardless of whether or not you have Use XInput enabled.
More than 4 XBox controllers cannot be used at the same time
Windows Standalone
XInput has a hard limit of 4 devices. You can mix and match non-XInput devices with XInput devices for a total of more than 4, but you cannot use more than 4 XInput compatible devices simultaneously if XInput is enabled. If you need to support more than 4 XInput controllers, you must disable XInput in the Rewired Editor - Settings page.
OSX Standalone
XBox 360 controllers on OSX require this XBox 360 driver. This driver also imposes the 4-device limit just like XInput. It is currently not possible to use more than 4 XInput devices simultaneously on OSX. Again, you can mix and match non-XInput controllers to achieve a total count greater than 4. Because the driver is required for the controller to be detected, there is no way to disable the use of this driver and get around this issue.
Windows Standalone: XBox One controller causes system crash when removed when using Raw Input on Windows 10
This is not a bug or issue with Rewired. A recent Windows Update has introduced a new bug in Windows 10 when using the XBox One controller. When Raw Input is enabled, if the XBox One controller is disconnected at runtime, it will cause the entire system to become unresponsive requiring a hard reboot to fix. I have isolated this issue to a specific Windows API Raw Input function call which is not optional. There is no known workaround for this problem when using Raw Input. This bug has been reported to Microsoft.
Windows Standalone: XBox One controller has incorrect mapping on Windows XP, Vista, 7, and 8 when using Unity fallback input
Microsoft changed the XBox One driver in Windows 10 and changed the mappings compared to Windows 7 and prior versions. When using Unity fallback as the input source, it is impossible to differentiate the XBox One controller on Windows versions prior to 10 and Windows 10. Therefore, the mapping for Windows versions prior to 10 is loaded on Windows 10 and the controller mappings are incorrect.
This is not an issue when using Raw Input, Direct Input, or XInput. It is advised that you do not use UnityEngine fallback input as the input source on the Windows Standalone platform due to this and many, many other issues.
Windows 10 Universal IL2CPP: Crash when disconnecting controllers
Note: This issue appears to affect builds running in Visual Studio only. It does not appear to affect Master builds that have been deployed.
As of Unity 5.3.4f1, after enabling support for standard HID joysticks in the Package.appxmanifest, Unity may crash when disconnecting a non-XInput controller. This is a bug in Unity, not Rewired and there is no possible workaround if you want to support any controllers besides XInput controllers. (To disable support for non-XInput controllers, remove the tags added to the Package.appxmanifest mentioned here.) This bug has been reported to Unity, but so far no fix has been announced.
This issue does not affect Windows 10 Universal builds when using the .NET scripting backend.
