UI System

Table of Contents

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:

ElementDescription
SpeedometerAnimated needle showing current speed (KMH or MPH)
TachometerEngine RPM gauge
Gear DisplayCurrent gear number (or R for reverse, N for neutral)
Speed TextNumeric speed readout
RPM TextNumeric RPM readout
Fuel GaugeFuel level indicator
NOS GaugeNitrous oxide level

Status Indicators

The dashboard also shows active vehicle systems:

IndicatorShows When
ABSAnti-lock braking is engaged
ESPElectronic stability is active
TCSTraction control is active
HeadlightsLow or high beam lights are on
IndicatorsLeft, 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:

ModeUI Elements
TouchScreenThrottle, brake, steer left, steer right buttons
GyroThrottle and brake buttons (steering via device tilt)
SteeringWheelVirtual steering wheel + throttle/brake pedals
JoystickVirtual joystick + throttle/brake buttons

Mobile UI Components

ComponentPurpose
RCCP_UI_JoystickVirtual joystick for steering
RCCP_UI_SteeringWheelControllerVirtual steering wheel with rotation
RCCP_UI_MobileDragTouch drag handling
RCCP_UI_DashboardButtonOn-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