A small Unreal Engine project demonstrating a Vue custom renderer through NativeWeb.
This repository is a minimal Unreal Engine example project for rendering a local Vue application with NativeWeb. It contains an otherwise empty map and a starter Blueprint, plus a small counter interface built with Vue's custom renderer.
The sample demonstrates the integration path from Vue render operations to NativeWeb's native UI bridge, with rendering provided by AffineUnreal and JavaScript execution provided by QuickJSUnreal.
The project has been confirmed to work with both DirectX 11 and DirectX 12.
- A simple Unreal map and starter Blueprint to host the example UI.
- A Vue 3 counter app with increment and reset actions.
- A custom Vue renderer that maps Vue nodes and updates to NativeWeb operations.
- Packaged UI assets:
ui.js,ui.css, and local font files. - Asset-backed app authoring with imported Unreal packages and soft references.
- A generated
#appmount root supplied by NativeWeb; the project does not include anindex.htmlfile. - The Unreal-to-JavaScript integration needed to display and interact with the sample.
The application sources are maintained separately in NativeWebVueAppExample. The built JavaScript and CSS used by this Unreal project are located in Content/NativeWeb/Vue/.
flowchart LR
Vue["Vue app and custom renderer"] -->|"nativeWeb DOM operations"| NW["NativeWeb"]
NW -->|"layout and render"| Affine["AffineUnreal"]
NW -->|"execute ui.js"| JS["QuickJSUnreal"]
Affine --> Viewport["Unreal viewport"]
JS --> Vue
NativeWeb supplies the local app shell and the JavaScript bridge. The Vue renderer creates and updates UI elements through that bridge, rather than mounting into a browser DOM. Unreal displays the result through the NativeWeb/AffineUnreal rendering integration.
Content/
|-- Blueprints/
| `-- BP_Starter.uasset
|-- Maps/
| `-- MAP_Demo.umap
`-- NativeWeb/
`-- Vue/
|-- ui.css
|-- ui.js
`-- fonts/
Plugins/
|-- AffineUnreal/ # Git submodule
|-- NativeWeb/ # Git submodule
`-- QuickJSUnreal/ # Git submodule
The plugins are included as Git submodules. Their repositories and roles in this example are:
| Submodule | Repository | Role in this project |
|---|---|---|
Plugins/NativeWeb |
NativeWebUnreal | Creates the local UI view, supplies the generated app shell, and bridges JavaScript UI operations to Unreal. |
Plugins/AffineUnreal |
AffineUnreal | Provides the UI rendering integration used by NativeWeb. |
Plugins/QuickJSUnreal |
QuickJSUnreal | Runs the bundled JavaScript app inside Unreal. |
Initialize the submodules when cloning:
git clone --recurse-submodules https://github.com/ArtemIyX/VueExample.gitIf you already cloned the project without its submodules:
git submodule update --init --recursive- Unreal Engine 5.7.
- Windows 64-bit development environment.
- The three plugin submodules initialized and available to UnrealBuildTool.
- DirectX 11 or DirectX 12. The project configuration defaults to DirectX 12; DirectX 11 has also been verified.
- Clone the repository with
--recurse-submodules, or initialize submodules as shown above. - Open
VueExample.uprojectwith Unreal Engine 5.7. - Allow Unreal to build the project and plugins if prompted.
- Open
Content/Maps/MAP_Demoand run the example.
The bundled UI files are in Content/NativeWeb/Vue/. To change the Vue application itself, edit the source project linked above, build its output, and update the corresponding packaged files here.
The project also includes a cookable NativeWeb app fixture. The native editor
commandlet creates five deterministic assets under
/Game/NativeWeb/AssetExample and reports every package save to
Saved/NativeWeb/AssetExample/generation-report.txt:
$engine = 'C:/Users/xeuse/Epic Games/UE_5.7/Engine'
& "$engine/Binaries/Win64/UnrealEditor-Cmd.exe" (Resolve-Path './VueExample.uproject').Path `
-run=NativeWebBuildAssetExample -unattended -nop4To launch the fixture in the engine Entry map, use this URL in Unreal's
open command:
/Engine/Maps/Entry?game=/Script/VueExample.NativeWebAssetExampleGameMode
Add -NativeWebAssetExampleSmoke to run the handoff check. It exits with status
0 only after JavaScript startup succeeds and a rendered texture reaches the GPU
viewport, and with status 1 on launch failure or timeout.
Config/DefaultGame.ini registers /Game/NativeWeb/AssetExample as an
always-cooked NativeWebApp primary asset directory. App packages own typed
soft references to their selected source and font packages, so normal cook
reachability includes the selected dependencies when no exclusion rule
applies. For dependencies managed separately from the apps, use an explicit
PrimaryAssetLabel with AlwaysCook or a project-level directory cook rule.
The usual Vue loose-file staging rule remains enabled for ordinary runs. For a
source-free staging check, build and cook with
-CustomConfig=NativeWebAssetExample, which clears that staging rule for that
configuration only. A local package command is:
$engine = 'C:/Users/xeuse/Epic Games/UE_5.7/Engine'
$project = (Resolve-Path './VueExample.uproject').Path
& "$engine/Build/BatchFiles/RunUAT.bat" BuildCookRun "-project=$project" -noP4 -unattended `
-platform=Win64 -clientconfig=Development -build -cook -stage -pak -iostore -package `
'-ubtargs=-CustomConfig=NativeWebAssetExample' '-map=/Engine/Maps/Entry' `
'-archivedirectory=.agent/orchestration/nativeweb-asset-backed-apps/artifacts/package'- This is a local UI example, not a web browser. It does not load arbitrary websites or provide browser navigation.
- The app is packaged as JavaScript and CSS; NativeWeb supplies its mount element, so an HTML file is not required for this workflow.
- JavaScript runs in the embedded QuickJS runtime and communicates with Unreal through NativeWeb's available bridge. Browser-only APIs should not be assumed to exist.
- The Vue source project and this Unreal host project are separate repositories; this repository contains the packaged UI assets used by the sample.
This project is licensed under the MIT License. Third-party plugins and assets may have their own terms; check their repositories for details.