Intermediate ⏱ 1 hour By SxL Staff

Building for Apple Vision Pro with Unity PolySpatial

Create your first shared-space visionOS app in Unity using the PolySpatial package — from project setup to running on device.

Apple Vision ProUnityvisionOSXR

Prerequisites

  • Mac with macOS Ventura 13.5+ and Xcode 15.2+
  • Unity 2022.3.18f1 or newer
  • Apple Vision Pro (borrow from the lab — book via the equipment page)
  • Apple Developer account (free tier works for device testing)

Step 1: Install PolySpatial

  1. Open your Unity project
  2. Window → Package Manager → + → Add package by name:
    com.unity.polyspatial
    com.unity.polyspatial.visionos
    com.unity.polyspatial.xr
  3. Also add com.unity.xr.visionos when prompted

Step 2: Configure Build Settings

  1. File → Build Settings → switch to visionOS
  2. In Player Settings:
    • Bundle ID: edu.cmu.sxl.yourappname
    • Target SDK: Device SDK
    • App Mode: Mixed Reality (Shared Space) or Full Space

Step 3: Set Up the Scene

  1. Delete the default camera
  2. Add GameObject → XR → XR Origin (VR) — PolySpatial will convert this
  3. Add a Volume Camera component to define your app’s spatial bounds
  4. For Shared Space apps, keep volumes under 1m³

Step 4: Build and Run

  1. File → Build Settings → Build — this creates an Xcode project
  2. Open the .xcodeproj in Xcode
  3. Select your Vision Pro as the run destination and hit Run

The app will appear in the user’s space alongside other visionOS apps.

← Back to Tutorials