Skip to content

Start the React dev server

Your HUD is a normal Vite project. Pick a starting point: scaffold a fresh one, or run one of the bundled examples.

bash
npm create unreal-react-hud@latest my-hud
cd my-hud
pnpm install
pnpm dev

The scaffolder produces a Vite + TypeScript project with the unreal-react-bridge SDK already wired through UnrealBridgeProvider. You get a working useReactState example, the devtools panel, and the ready handshake out of the box.

Why a scaffolder

The boilerplate is small but easy to typo (provider order, channel name, ready-event listener). Scaffolding skips a class of "why is nothing arriving" bugs.

Path B — Run an example from this repo

bash
cd web/sdk/examples/multi-hud
pnpm install
pnpm dev

Four runnable examples live under web/sdk/examples/:

ExampleWhat it shows
basic-hudMinimal useReactState + a single push from BP
chat-systemChat-mode focus toggle (Enter / Esc)
game-menuPause menu pattern with route navigation
multi-hudFour anchored layers driven by one BP event each

Each example ships its own pnpm dev script and serves on http://localhost:5173 by default.

Configure the URL in UE

The dev server URL is read from one of two places, in order:

  • Per-widget override. Open your WBP_MyHUDClass Defaults → set URL. This wins whenever it is non-empty.
  • Project-wide default. Project Settings → Plugins → Unreal React Bridge → Default Dev URL. Used when a widget's URL is empty.

For the full list of settings (queue size, devtools, logging), see Project Settings.

Released under the MIT License.