|
Download UNITY_SETUP.md from LoveLogicAI/xros-shell: direct link, hf CLI and curl.
- Browser
- Download file 4.67 kB
-
https://huggingface.co/LoveLogicAI/xros-shell/resolve/main/UNITY_SETUP.md
- Command line
-
hf download hf://LoveLogicAI/xros-shell/UNITY_SETUP.md
-
curl -L -o UNITY_SETUP.md https://huggingface.co/LoveLogicAI/xros-shell/resolve/main/UNITY_SETUP.md
4.67 kB
XROS Shell β Unity (Quest 3) Setup Guide
This guide assembles the Unity frontend for the spatial OS shell. The backend (Python) runs on your computer; the Quest 3 app is a thin client that renders spatial panels and hosts the terminal.
Architecture
Quest 3 (Unity) Your computer (Python)
βββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β WorldPanelManager ββββspawn/moveββ€ xros_server.py β
β (spatial panels) β /remove β ββ WorldState β
β SpatialShellTerminal βββcommandββββββΊβ ββ SpatialShell β
β (terminal panel) ββββoutputβββββββ€ (spawn/move/ls/gen)β
β XrosClient (WebSocket) β β β
βββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
1. Prerequisites
- Unity 2022.3 LTS (or newer) with Android Build Support module.
- Meta XR All-in-One SDK (or Core SDK) β via the Unity Package Manager.
- Quest 3 in Developer Mode (Meta Horizon app β Settings β Developer).
- Python 3.11+ on your computer, with
websocketsinstalled (pip install websockets).
2. Create the project
- New project β 3D (URP) template.
- File β Build Settings β Android β Switch Platform.
- Edit β Project Settings β Player β Other Settings:
- Set Minimum API Level to 29+ (Quest 3 requires 32).
- Set Scripting Backend to IL2CPP, Target Architectures ARM64.
- Package Manager β add Newtonsoft Json
(
com.unity.nuget.newtonsoft-json) β required byXrosClient.cs. - Package Manager β add TextMeshPro (import TMP Essentials when prompted).
3. Import Meta XR SDK
- Package Manager β Add package by name:
com.meta.xr.sdk.all(All-in-One) β orcom.meta.xr.sdk.corefor the minimum. - Edit β Project Settings β XR Plug-in Management β install OpenXR, enable it for Android, and add Meta Quest Support.
- Edit β Project Settings β Oculus β enable Passthrough and Hand Tracking (or use the Meta XR setup wizard).
4. Build the scene
- Delete the default camera. Add OVRCameraRig (Meta XR β OVRCameraRig).
- Add an OVRPassthroughLayer to the rig's CenterEyeAnchor for passthrough.
- Add OVRHand components (left + right) to the rig for hand tracking.
- Create an empty GameObject "XROS" and add the three scripts:
XrosClient.csWorldPanelManager.csSpatialShellTerminal.cs
5. Terminal panel UI
- Under the rig, create a Canvas (World Space), size ~0.8 Γ 0.5 m, positioned ~1.5 m in front of the user.
- Add a TMP_InputField (the command line) and a TMP_Text (the output log) as children.
- On
SpatialShellTerminal, assignclient(the XrosClient),input, andoutput. Wire the input field's OnSubmit toSubmit().
6. Panel prefab
- Create a Quad (or a small World-Space Canvas) with a TMP_Text child named "Title".
- Save it as a prefab and assign it to
WorldPanelManager.panelPrefab.
7. Point the client at your backend
- Find your computer's LAN IP (
ipconfig/ifconfig). - On
XrosClient, setserverUrltows://<your-lan-ip>:8765. - Start the backend on your computer:
python xros_server.py --host 0.0.0.0 --port 8765 - Ensure the Quest and your computer are on the same Wi-Fi network.
8. Build & run
- File β Build Settings β Build And Run with the Quest connected via USB (or use Quest Link / Air Link for fast iteration).
- Put on the headset. You should see passthrough, the terminal panel, and your hands.
- Type in the terminal:
helpspawn panel --title "Hello world"gen a clock for the wallls
A panel should appear in the room for each spawn/gen, driven by the shared
world model on your computer.
Troubleshooting
- No connection: check the LAN IP, that the backend is running with
--host 0.0.0.0, and that both devices are on the same network. - No passthrough: enable Passthrough in Project Settings β Oculus, and add the OVRPassthroughLayer.
- No hands: enable Hand Tracking and add OVRHand components.
- JSON errors: confirm Newtonsoft Json is installed in the Package Manager.