This page covers the general overview of OneJS. If you’re eager to dive right in, head over to the Getting Started page!
Overview
OneJS lets you use JavaScript in Unity, for both runtime and editor. It focuses on UI scripting but works for anything you’d usually handle with JS.
It integrates directly with Unity’s UI Toolkit , a shader-based, retained-mode UI system inspired by web tech. UI Toolkit already offers web concepts like DOM and CSS, and OneJS complements it by having a JavaScript backend (QuickJS, V8, or NodeJS via Puerts ), so you can build UIs using familiar toolings like TypeScript, Preact, Tailwind, and ESBuild.
Why use OneJS
- Lightning-fast iteration: Change your UI code and see results instantly. No more domain reloads.
- Familiar tooling: Use TypeScript, (P)React, Tailwind and other web techs you already know and love.
- Broaden the talent pool: Studios can tap into web devs for UI work.
- Unity-native: Works directly with UI Toolkit  - no browser, no overhead.
- Desktop and Mobile: Tested on Windows, Mac, iOS, and Android.
- Powerful scripting: Give your players the ability to mod your game with TypeScript and JSX.
JavaScript pretty much runs the show when it comes to modern UI, thanks to all the frameworks and tools that make dev work smoother across the board. It’s constantly evolving, super flexible, and backed by a huge community. What we’re aiming for is to bring as much of that web tech into Unity as we can, so we get the best of both worlds.
Limitations
OneJS uses Unity’s UI Toolkit as its DOM layer, so keep in mind that UI Toolkit only supports a limited set of DOM and CSS features. Here’s what’s not supported (yet):
- Canvas (but there’s a Vector API workaround)
- SVG (partially supported now, but still room to grow)
- Complex CSS selectors
- CSS animations and keyframes (on UI Toolkit’s roadmap)
WebGL support isn’t in yet, but it’s coming in V2. It’ll follow Puerts’ WebGL workflow and run on the browser’s JS engine. Stay tuned.
Working with Constraints
Unity’s UI Toolkit  has its quirks and missing bits compared to standard web tools, but that’s kind of the point. These constraints are part of game dev DNA. They push you to get creative, optimize smart, and solve problems in ways you might not have considered otherwise. Everyone’s working with the same limitations, so it levels the playing field and opens the door to unique solutions.
That said, UI Toolkit is already a solid pick. It’s built on proven web standards, giving your game UIs a stable, future-proof foundation. And of course, OneJS is right here to supercharge the whole experience.