UI System
Table of Contents
- UI System
- Overview
- UI Architecture
- Dashboard
- Status Indicators
- Dashboard Slider Component
- In-Vehicle Dashboard
- Mobile Controls
- Mobile UI Components
- Settings Panels
- Audio Settings
- Quality Settings
- Behavior Presets
- Transmission Selector
- Mobile Controller Selector
- Input Rebinding UI
- Customization UI
- Notification System
- Vehicle Spawn UI
- Scene Selection
- Lite Promotion Banner
- Next Steps
Overview
RCCP provides a complete UI system with a dashboard display, mobile controls, vehicle customization panels, settings menus, and input rebinding. The UI is managed by RCCP_UIManager, which is instantiated from a prefab referenced in RCCP Settings and automatically connects to the active player vehicle.
UI Architecture
The UI canvas is spawned automatically when a player vehicle is registered, or can be added manually via Tools > BoneCracker Games > RCCP > Create > Add UI Canvas.
RCCP_UIManager is a singleton that tracks the active player vehicle and updates all UI elements accordingly. When the active vehicle changes, the UI automatically reconnects to the new vehicle's data.
Dashboard
The dashboard displays real-time vehicle telemetry:
| Element | Description |
|---|---|
| Speedometer | Animated needle showing current speed (KMH or MPH) |
| Tachometer | Engine RPM gauge |
| Gear Display | Current gear number (or R for reverse, N for neutral) |
| Speed Text | Numeric speed readout |
| RPM Text | Numeric RPM readout |
| Fuel Gauge | Fuel level indicator |
| NOS Gauge | Nitrous oxide level |
Status Indicators
The dashboard also shows active vehicle systems:
| Indicator | Shows When |
|---|---|
| ABS | Anti-lock braking is engaged |
| ESP | Electronic stability is active |
| TCS | Traction control is active |
| Headlights | Low or high beam lights are on |
| Indicators | Left, right, or hazard lights active |
Dashboard Slider Component
RCCP_UI_DashboardSlider drives gauge needles. It reads a float value from the vehicle (speed, RPM, etc.) and rotates or moves a UI element proportionally.
In-Vehicle Dashboard
RCCP_Visual_Dashboard provides an in-world 3D dashboard inside the vehicle cabin for first-person view. It uses world-space UI or mesh-based gauges.
Mobile Controls
On mobile platforms, RCCP provides on-screen controls that correspond to the selected mobile input mode:
| Mode | UI Elements |
|---|---|
| TouchScreen | Throttle, brake, steer left, steer right buttons |
| Gyro | Throttle and brake buttons (steering via device tilt) |
| SteeringWheel | Virtual steering wheel + throttle/brake pedals |
| Joystick | Virtual joystick + throttle/brake buttons |
Mobile UI Components
| Component | Purpose |
|---|---|
RCCP_UI_Joystick | Virtual joystick for steering |
RCCP_UI_SteeringWheelController | Virtual steering wheel with rotation |
RCCP_UI_MobileDrag | Touch drag handling |
RCCP_UI_DashboardButton | On-screen button interactions |
Settings Panels
Audio Settings
RCCP_UI_SetAudio provides volume sliders for master, engine, and effects audio.
Quality Settings
RCCP_UI_SetQuality offers buttons or a dropdown to change Unity's quality level at runtime.
Behavior Presets
RCCP_UI_SetBehaviorType lets the player switch between driving behavior presets (e.g., normal, sport, drift) that change stability settings, steering response, and drift behavior.
Transmission Selector
RCCP_UI_SetGearbox allows switching between Automatic, Manual, and CVT transmission at runtime.
Mobile Controller Selector
RCCP_UI_SetMobileController lets players choose their preferred mobile input mode.
Input Rebinding UI
RCCP_UI_RebindInput provides a per-action rebinding interface. When the player clicks a rebind button, the system listens for the next key/button press and assigns it to that action. RCCP_UI_RebindInputReset resets all bindings to defaults.
Rebinding data is automatically saved and loaded if enabled in RCCP Settings.
Customization UI
See 09_Customization.md for the full customization UI documentation. The customization panel includes sub-panels for paint, wheels, spoilers, decals, neons, sirens, and performance upgrades.
Notification System
RCCP_UI_Informer displays toast-style notifications for vehicle events (engine start, gear changes, damage, etc.). It subscribes to RCCP_Events.OnRCCPUIInformer and shows messages with an auto-dismiss timer and TextMeshPro animation.
Vehicle Spawn UI
RCCP_UIManager includes panels for spawning vehicles from the demo vehicle registry or prototype prefabs. These panels display available vehicles and let the player select one to spawn.
Scene Selection
RCCP_UI_SceneSelector provides a UI for switching between demo scenes or levels.
Lite Promotion Banner
RCCP_UI_LitePromo displays an in-game banner encouraging users to upgrade to RCCP Pro, with a link to the Asset Store page.
Next Steps
- 11_SceneManagement.md — Spawning and managing vehicles
- 09_Customization.md — Customization UI details