Special Platform Support
Platforms:
Windows App Store
To build for the Windows App Store, you must install Windows App Store support. In order to build for this platform, you must be using the Windows Unity editor.
Install Windows App Store platform support through the menu:
Window -> Rewired -> Setup -> Install Platform Support -> Windows App Store
NOTE:
Rewired does not support Windows App Store in Unity 5.0.0 due to a new Unity bug. See this page for details. The bug was fixed in 5.0.1, so upgrade to Unity 5.0.1+ if you need Windows App Store Support.
IMPORTANT NOTE FOR UNITY 5 USERS:
Unity 5 now requires that a Placeholder path be set in the Plugins/Metro/Rewired_Core.dll inpspector or you will get compilation errors when you try to compile. You must set this path to the current location of the main Rewired_Core.dll in your project. If you move the Rewired folder to another directory, this path will have to be changed manually because Unity stores a path here instead of a GUID.
Here are the steps:
- Select Plugins/Metro/Rewired_Core.dll in the project view.
- In the inspector, click the Placeholder field and navigate to Assets/Rewired/Internal/Libraries/Runtime/Rewired_Core.dll
- Click Apply
This is not automated because users tend to move Rewired around into various folders in the project. Because Unity chose to store a path here instead of a GUID, the link will break each time the Rewired folder is moved.
OUYA
To build for the OUYA platform you must first install the OUYA Everwhere SDK Unity plugin. This can be obtained from the OUYA Developer site here.
For help installing and configuring OUYA support for Unity in general, see the docs:
OUYA plugin documentation
Building to Ouya
To build for the Ouya platform, you must do the following:
- Follow the OUYA plugin documentation to set up the Unity environment for Ouya support.
- Switch the Unity editor build target to Android.
- Ensure that "Build to Ouya" is checked in the Rewired Global Options panel which can be found at:
Window -> Rewired -> Global Options - Place OuyaGameObject prefab from the OUYA SDK in your scene as mentioned in the OUYA plugin documentation.
- Build through the standard Unity build panel.
For questions about supported controllers on Ouya, see here.
XBox One
Rewired includes an XBox One library for better controller support and more accurate hot-plugging behavior. Rewired supports gamepad vibration on XBox One, however you must first install all the prerequisite Xbox One native libraries provided by Unity.
If you receive an error when switching to the Xbox One build target in Unity, make sure the Xbox One platform is checked on the Rewired_Core.dll import options.
Dependencies
Xbox One support requires that you install the following native libraries provided by Unity be installed into Plugins/XboxOne:
- Gamepad.dll
- Storage.dll
Without these dependiences installed correctly, XBox One builds will not function. You may only see black screen when launching the build on the Xbox One if the libraries are not installed.
Accessing XBox One Controller Features
Special controller features of the XBox One gamepad such as vibration can be accessed via the XboxOneGamepadExtension class available in the Joystick class as seen in the example below:
using Rewired.Platforms.XboxOne;
void MyMethod() {
// Set vibration in all controllers in player
foreach(Joystick joystick in player.controllers.Joysticks) {
#if UNITY_XBOXONE
// Get the ControllerExtension for Xbox One and set left gamepad motor to full value
joystick.GetExtension<XboxOneGamepadExtension>().SetVibration(XboxOneGamepadMotorType.LeftMotor, 1.0f);
#else
// Set first motor to full value
joystick.SetVibration(0, 1.0f);
#endif
}
}
