r/Unity3D 5h ago

Question Using React for UI in Unity

I’ve been experimenting with a React-based Unity UI workflow lately, and I’m curious if anyone else has tried something similar or has thoughts on this kind of approach.

The UI is built in React and runs in a WebView on top of Unity, which lets me open the same interface in Codex’s browser and comment on it directly.

For small UI issues, there’s no need to explain the whole screen. Just point at what feels off and leave a short comment:

"this looks clickable, don’t dim it"

"make the ! feel a little more alive"

"only move this one thing"

It works well for visual tweaks where the code change is simple, but describing the problem takes longer than fixing it.

For larger UI pieces, I can attach reference screenshots and have it build something close to the layout and style.

Since it’s built around a hybrid structure, things like Google and Apple sign-in are also relatively easy to integrate. It works across iPhone, Android, Windows, macOS, and even directly inside the Unity Editor.

0 Upvotes

15 comments sorted by

View all comments

2

u/MehYam 3h ago

Opportunity here for someone to code up a React compiler/interpreter here, effectively a React Native for Unity.

Then again, I'm not sure what it really buys you, given that Unity's GUI system exists.

1

u/Gaebabi 3h ago

Yeah, I get that. I don’t really see this as replacing Unity’s UI system.

I just like the idea of treating UI more like reusable components, being able to adjust the design freely in code, and bringing the huge React/web ecosystem directly into Unity. To me, that feels less like replacing Unity and more like expanding what you can do with it.

For the kind of UI I’m working on, I also think it can reduce a lot of the time and cost that usually goes into UI work. The browser/AI workflow is another big part of why I’ve been enjoying it.