OneJS
Your web skills, now in Unity.
OneJS builds Unity UI with React and TypeScript
A Unity plugin that renders React 19 and TypeScript interfaces natively through UI Toolkit.
What OneJS does
OneJS is a Unity plugin that lets developers build user interfaces with React 19 and TypeScript, rendered natively through UI Toolkit rather than in a browser or webview. The readme shows a short example where a component holds a count in state, renders a text label and a button, and increments the count on click, then calls render with the app and a root. Saving the file hot reloads the UI in the editor, in both Edit mode and Play mode. The highlights list spells out the approach: React 19 and TypeScript with esbuild bundling and npm packages, a hot reload that works without entering Play mode through an edit mode preview, a one click setup where the user adds a JSRunner, clicks Initialize Project, and starts coding, and three styling options through USS, CSS Modules, and a built in Tailwind style JIT generator with no npm dependency. Full C# interop is a stated feature, letting JavaScript reach any C# type, with zero alloc fast paths for per frame data. The package also bundles extras such as 2D particles, a GPU compute bridge, vector drawing, fetch, WebSocket, and localStorage. The project reports 346 stars and 26 forks on GitHub. The site is onejs.com.
Setup, interop, and platform support
Installation is offered through the Unity Package Manager by adding the git URL https://github.com/Singtaa/OneJS.git, or by cloning the repository into Assets/OneJS. An Asset Store package linked from onejs.com bundles the runtime with premade onejs-ui themes named Pixel, Kawaii, and Sketch, plus sample cartridges for a game HUD, inventory, and shader effects. The quick start has the user add the JSRunner component to a GameObject in a saved scene and click Initialize Project in the inspector, or simply enter Play mode since first run setup happens automatically. JSRunner creates PanelSettings, scaffolds a starter React app next to the scene, runs npm install and npm run build, and starts rendering in the Game view, then manages the esbuild watcher so saving a file shows the change. C# interop is shown with ES6 imports of UnityEngine namespaces rewritten at build time, direct access through a CS proxy, and C# Tasks turned into JavaScript Promises, with zero alloc fast paths for per frame data described in separate guides. Platform support varies by engine: the editor, Windows, macOS, and Linux use QuickJS with the bundle embedded as a TextAsset; iOS and Android use statically linked QuickJS; and WebGL uses the browser's own JIT engine for native performance. Requirements are Unity 6.3 or newer and Node.js 18 or newer on the development machine only.
V3 changes and licensing
The readme includes a coming from V2 section for users on the older branch. Version 2 lives on the onejs-v2 branch and still works on Unity 2022.3 and newer. The changes in V3 are summarized in a table: the UI framework moved from Preact to React 19, the JavaScript engine moved from PuerTS, which could use QuickJS, V8, or NodeJS, to a purpose built QuickJS core, setup changed from manual UIDocument and PanelSettings to a one click Initialize Project, and Tailwind changed from a PostCSS toolchain to a built in generator with no npm dependency. These changes aim to make the first run smoother and to reduce the build tooling a project must carry. The moddable games feature lets players extend a UI with TypeScript and JSX, which the readme positions as useful for community made interfaces on top of a shipped game. The combination of a familiar React model, native rendering through UI Toolkit, and deep C# interop gives Unity teams a web like UI workflow without embedding a browser. The project is published under the MIT license, so the runtime can be adopted in commercial and open projects alike. The repository's continuous integration workflow runs on the project's swift styled action and the readme links to onejs.com for the product overview and sample cartridges.
Editorial conclusion
The repository is published under the MIT license and its most recent commit was on 2026-08-26.
Community notes