unity-xr

Installation
SKILL.md

Purpose

This skill automates and assists in developing XR applications with Unity, focusing on AR and VR features like hand tracking, spatial audio, and multi-platform builds for devices such as Oculus Quest or HoloLens. It leverages Unity's XR ecosystem to streamline immersive interaction code.

When to Use

Use this skill when creating interactive AR/VR experiences, such as virtual training simulations, 3D product visualizations, or multiplayer VR games. Apply it for cross-platform projects needing device-agnostic code, like adapting to Android ARCore and iOS ARKit, or when optimizing for performance on standalone VR headsets.

Key Capabilities

  • Handles XR Interaction Toolkit for input systems: Use XRBaseInteractable to define grabbable objects in VR scenes.
  • Supports AR Foundation for unified AR development: Enable plane detection with ARPlaneManager to track surfaces.
  • Ensures cross-platform compatibility: Configure build settings for multiple targets using Unity's Player Settings API, e.g., set XRSettings.enabled = true; for specific devices.
  • Manages immersive interactions: Implement raycasting for VR pointers via XRInteractorLineVisual, with collision checks in 2-3 lines of C# code.
  • Optimizes for performance: Use Unity's Profiler to monitor frame rates, integrating with XR plugins to cap at 90 FPS for VR.

Usage Patterns

To set up a basic XR project, first install Unity and the XR packages via the Package Manager. Import the XR Interaction Toolkit, then create a new scene and add an XR Rig prefab. For AR, initialize an AR Session in your script's Start() method. Always test on target hardware early. For VR interactions, attach scripts to GameObjects to handle events like OnSelectEntered(). Structure code modularly: separate input handling from logic. When building, use command-line builds for automation, e.g., run Unity -batchmode -projectPath /path/to/project -buildTarget Android -executeMethod BuildScript.PerformBuild.

Related skills
Installs
26
GitHub Stars
5
First Seen
Mar 7, 2026