XR Keyboard with UI Toolkit in Unity
While working on an XR project for my job, I needed a login screen which also meant building a keyboard from scratch. Thanks to my web development background, I was already familiar with JS, CSS, and HTML, and by coincidence I discovered that Unity’s UI Toolkit works in a very similar way, using CS, USS and UXML.
With Unity 6.2 introducing 3D World Space support for UI Toolkit, I was able to bring this system into XR. Still, USS has several limitations compared to CSS (for example, parent opacity changes don’t propagate correctly to children).
Each UI panel is its own GameObject, and I connected them through interfaces. This way, whenever a new page is added, there’s no need to update the keyboard or write additional code as long as there’s an input field, it just works.
And honestly, whether it’s in XR or on the Web, writing a modular keyboard that supports multiple languages is always a challenging task.
#vr #xr #ar #unity3d #uitoolkit #virtualreality #mixedreality #augmentedreality #keyboard #xrkeyboard #vrkeyboard #uitoolkit #ui
Evet bu arada Unity'ye geçtim...