Basic Usage

Accessing Rewired in Scripts

To access Rewired classes from a script, add the following line to the top of the script so you don't have to type the Rewired namespace each time:

C#:

using Rewired;

Javascript (add below any #pragma statements):

import Rewired;

Boo:

import Rewired

 

The Most Important Classes

Rewired.ReInput - The primary static input class. Access Players, Controllers, and much more.

Rewired.Player - Access input through Player.

For more important classes, see How To's - Important Classes

See the API Reference for a complete list of classes.

 

"Id" is NOT an "Index"

Anywhere the term Id is used in the API is a UNIQUE ID, not an Index, and cannot be used to iterate over items or get the first Joystick.

 

Debugging and Troubleshooting

The single most important tool for debugging and troubleshooting is Debug Information.