Input and controls
Configure legacy, new Input System and mobile UI input.
Backend selection
Set Player Settings โ Active Input Handling, then restart Unity if requested.
| Setting | Demo backend |
|---|---|
| Input Manager (Old) | Legacy adapter; the Input System package is optional. |
| Input System Package (New) | New adapter; requires com.unity.inputsystem 1.6 or newer. |
| Both | New adapter only, avoiding duplicate actions. |
For Unity 6.3, use the compatible Input System version offered by Package Manager. RSBRuntime references Unity UI; install com.unity.ugui for the UI components. The optional RSBInputSystem assembly is constrained by the input setting and package version.
Bindings
| Control | Action |
|---|---|
| WASD / arrows | Move. |
| Mouse | Look. |
| Left mouse | Fire. |
| Hold right mouse | Aim. |
| R | Reload. |
| Space | Jump; fire in MinimalDemo. |
| Left Shift | Sprint; hold breath while aiming. |
| Mouse wheel | Scope zoom. |
| B / V while aiming | Zero distance up / down. |
| 1 / 2 / 3 | Full-demo far target / target distance / close target controls. |
| 4 | Full-demo trajectory toggle. |
| 5 | Full-demo bullet-time effect selection. |
For new input, edit src/Input/NewInputSystem/Resources/RSBDemoControls.inputactions. The demo clones this resource at runtime; it does not replace your project's Input Actions. Bindings cover keyboard/mouse and touch UI, not a complete gamepad controller.
Legacy movement needs Horizontal, Vertical, Mouse X and Mouse Y axes. Legacy UI uses Horizontal, Vertical, Submit and Cancel, matching Unity's default Input Manager. Other demo actions are mapped in RSBDemoInput.cs.
EventSystem and custom controls
RSBDemoEventSystem disables existing input modules on its own EventSystem and configures the module matching the selected backend. It leaves your other EventSystems alone. Keep one active UI EventSystem for the sample UI and retain the RSB component when rebuilding the mobile canvas setup.
RSBDemoInput exposes Move, Look, Scroll, Pressed, Released and Held. An IRSBDemoInput implementation can be installed with Register; the previous backend is disposed. Register your replacement after the package's startup registration if replacing it deliberately.
The ballistics API is independent of this adapter. Existing controls can call FireBallisticsBullet, the weapon's FireInput, ReloadInput and AimInput, or scope ZoomIn/ZoomOut. The supplied movement and look controllers read their input internally, so adapt those reads or the backend for custom movement.