Skip to content
Skills Library
Programming · Building & coding

unity-xr

/unity-xr

Unity XR — XR Interaction Toolkit 3.x (Interactor/Interactable/Manipulation), AR Foundation (planes, anchors, image tracking, body tracking), OpenXR, hand tracking on Quest/Vision OS. USE WHEN: VR/AR/MR projects, integrating XR controllers, AR plane detection, XR locomotion, hand tracking, eye tracking, OpenXR features. DO NOT USE FOR: regular 3D gameplay (use `unity-physics-anim`); rendering pipeline (use `unity-rendering` — XR has URP-specific considerations).

Licence
MIT
Last repository change
21.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Unity XR — XR Interaction Toolkit 3.x (Interactor/Interactable/Manipulation), AR Foundation (planes, anchors, image tracking, body tracking), OpenXR, hand tracking on Quest/Vision OS. USE WHEN: VR/AR/MR projects, integrating XR controllers, AR plane detection, XR locomotion, hand tracking, eye tracking, OpenXR features. DO NOT USE FOR: regular 3D gameplay (use `unity-physics-anim`); rendering pipeline (use `unity-rendering` — XR has URP-specific considerations).

Original author description

Unity XR — XR Interaction Toolkit 3.x (Interactor/Interactable/Manipulation), AR Foundation (planes, anchors, image tracking, body tracking), OpenXR, hand tracking on Quest/Vision OS. USE WHEN: VR/AR/MR projects, integrating XR controllers, AR plane detection, XR locomotion, hand tracking, eye tracking, OpenXR features. DO NOT USE FOR: regular 3D gameplay (use `unity-physics-anim`); rendering pipeline (use `unity-rendering` — XR has URP-specific considerations).

How it works

  1. Stack overview
  2. XRI 3.x — interactors and interactables
  3. Locomotion
  4. AR Foundation basics
  5. Hand tracking
  6. Performance for XR
  7. Anti-patterns
  8. Production checklist
Original SKILL.md headings · 98 lines, 494 words
SKILL.md preview
---
name: unity-xr
description: |
  Unity XR — XR Interaction Toolkit 3.x (Interactor/Interactable/Manipulation),
  AR Foundation (planes, anchors, image tracking, body tracking), OpenXR, hand
  tracking on Quest/Vision OS.

  USE WHEN: VR/AR/MR projects, integrating XR controllers, AR plane detection,
  XR locomotion, hand tracking, eye tracking, OpenXR features.

  DO NOT USE FOR: regular 3D gameplay (use `unity-physics-anim`); rendering
  pipeline (use `unity-rendering` — XR has URP-specific considerations).
allowed-tools: Read, Grep, Glob, Write, Edit
---

# Unity XR

## Stack overview

```
                  XR Interaction Toolkit (input + interaction)
                                  ↑
                          XR Plug-in Management
                          ↙           ↘
                    OpenXR        ARKit / ARCore
                       ↘             ↙
                   Native runtimes (Quest, Vision OS, Pico, mobile)
```

For VR (Quest, PCVR, Vision OS) → **XRI 3.x** + **OpenXR** plug-in. For AR (mobile) → **AR Foundation** + ARKit/ARCore providers. Mixed Reality on Quest 3 → AR Foundation features (passthrough, anchors) work on top of OpenXR.

## XRI 3.x — interactors and interactables

```csharp
// On a controller GameObject
NearFarInteractor   — combines direct grab + ray
TeleportInteractor  — for teleport locomotion

// On an interactable object
XRGrabInteractable
XRSocketInteractor (slot)
XRSimpleInteractable (just hover/select)
```

Use the `Interaction Manager` in the scene; both interactors and interactables register with it.

## Locomotion

XRI provides:
- **Continuous Move** + **Continuous Turn** — comfort options (snap turn, vignette).
- **Teleport** — TeleportationProvider + TeleportationArea/Anchor.
- **Climb** — ClimbProvider + ClimbInteractable.

Always offer multiple comfort options (snap turn 30°/45°, smooth turn, vignette intensity slider).

## AR Foundation basics

```csharp
public class PlaneSpawner : MonoBehaviour {
    [SerializeField] private ARRaycastManager raycastManager;
    [SerializeField] private GameObject prefab;
    private static readonly List<ARRaycastHit> Hits = new();

    void Update() {
        if (!Touchscreen.current?.primaryTouch.press.wasPressedThisFrame ?? true) return;
        var pos = Touchscreen.current.primaryTouch.position.ReadValue();
        if (raycastManager.Raycast(pos, Hits, TrackableType.PlaneWithinPolygon)) {
            var hit = Hits[0].pose;
            Instantiate(prefab, hit.position, hit.rotation);
        }
    }
}
```

Add `ARSession`, `ARSessionOrigin` (or `XROrigin` in newer AR Foundation), and the relevant manager components (`ARPlaneManager`, `ARAnchorManager`, `ARFaceManager`, etc.) to the scene.

## Hand tracking

| Platform | API |
|---|---|
| Quest | OpenXR + `OVRSkeleton`/`OVRHand` (Meta SDK) or XR Hands subsystem |
| Vision OS | XR Hands subsystem (OpenXR) |
| Mobile AR (image-based) | AR Foundation `ARHumanBodyManager` (limited) |

Use Unity's **XR Hands** package (`com.unity.xr.hands`) for cross-platform hand poses (joints, gestures).

## Performance for XR

- **Target frame rate**: Quest 2 = 72/90Hz, Quest 3 = 90/120Hz, Vision OS = 90Hz. Missing frame budget causes nausea — non-negotiable.
- **Single-Pass Instanced** stereo rendering (URP): cuts vertex shader work in half.
- **Foveated rendering** on supported platforms (Quest 3 via OpenXR extension).
- **Reproject / spacewarp** as a fallback — but design for native frame rate first.

## Anti-patterns

| Anti-pattern | Fix |
|---|---|
| Smooth-only locomotion (no comfort options) | Always offer teleport + snap turn |
| Heavy post-processing in VR | Disable bloom/SSAO on Quest; rely on baked lighting |
| World-space UI without curved canvas | Curve UI + raycast from controller for legibility |
| `Camera.main` for head pose | Use `XROrigin.Camera` |
| Ignoring play space recentering | Listen to `OnDeviceRecentered` events |

## Production checklist

- [ ] Frame rate met on minimum-spec headset
- [ ] Comfort options menu (turn type, vignette, height calibration)
- [ ] Hand tracking + controllers both supported (where platform allows)
- [ ] AR session error states handled (camera permission denied, plane lost)
- [ ] Single-pass stereo enabled in URP
- [ ] No motion sickness on a fresh tester

Versions

RepositoryScoreLicence
This page · claude-dev-suite/claude-dev-suite100MIT
IdoCohen560/claude-unity-game-studio100MIT

Database snapshot: 13.11.2026 · package version 6346dc478685 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100xr-development
    Use when building VR/AR/XR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+
  • 100xr-development
    Use when building VR/AR/XR applications — OpenXR setup, XROrigin3D, hand tracking, controllers, passthrough, and Meta Quest deployment in Godot 4.3+
  • 100hz-xr-simulator-install-and-configure
    Installs and configures the Meta XR Simulator for testing Meta VR and Horizon OS apps without a physical device. Use when installing the simulator or integrating it with Unity, Unreal, or native OpenXR projects. For controlling a running simulator, use hz-xr-simulator-control.…
  • 100godot-platform-vr
    Expert blueprint for VR platforms (Meta Quest, PSVR, SteamVR, Pico) covering XR toolkit (OpenXR), comfort settings (vignetting, snap turning, teleport), motion controls, hand tracking, and 90+ FPS requirements. Use when targeting VR headsets or implementing immersive 3D…
  • 90godot-platform-vr
    Expert blueprint for VR platforms (Meta Quest, PSVR, SteamVR, Pico) covering XR toolkit (OpenXR), comfort settings (vignetting, snap turning, teleport), motion controls, hand tracking, and 90+ FPS requirements. Use when targeting VR headsets or implementing immersive 3D…
  • 100meta-xr-sdk
    Build VR/AR apps for Meta Quest (2/3/3S/Pro) — WebXR in the browser and Quest-native spatial apps. Use when building immersive WebXR with Three.js or React Three Fiber, mixed reality with passthrough, hand tracking, spatial anchors, plane/mesh detection, porting 2D apps to…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.