Hardware Requirements
Apple Silicon Mac (M1 or newer)
Software Requirements
Storage Space for Unity 2022.3 (LTS) or later (~15GB) and visionOS XCode simulator (~5GB)
Xcode 15.2+ (download here)
Brown University Enterprise Developer Account access (make sure to register before lab!)
Technical Documentation
Prerequisites:
Unity Account - Follow instructions at bottom of tutorial for creating a Unity account.
Unity 6000.0.22f1 - Ensure you're using Unity 6000.0.22f1 in the Unity Editor. This version is essential for compatibility with the project template.
Polyspatial SDK - The Polyspatial SDK should already be included in the template project.
Xcode - For building the app for iOS or other AVP devices.
Apple Developer Account - Make sure you are logged in to your Apple Developer Account on your Mac. You can log in via System Preferences > Apple ID. This is necessary for signing the app with a certificate.
AVP Platform - Access to the AVP platform or device where the project will be tested.
Go to the Google Drive link provided here.
Download the ZIP file.
Extract the ZIP file to the following directory on your machine:
Documents/unity/ (This is your workspace directory where Unity projects will be located).
A. Open the Template Project in Unity Editor
Make sure Unity 6000.0.22f1 is installed.
In the Unity Hub, select Add Project From Disk.
Navigate to Documents/unity/ where you extracted the template project.
Select the template folder and open it in Unity.
Note: Normally, you would need to install the Polyspatial SDK through the Package Manager (via Window > Package Manager), but since the SDK is already included in the template project, this step is skipped.
B. Configure Build Profiles
Open Build Profiles:
Go to File > Build Profiles.
Select VisionOS:
Ensure that VisionOS Device SDK is selected as the platform for the project. If it is not selected, switch to VisionOS by choosing it from the available platforms.
Click Switch Platform if necessary to ensure that Unity is targeting VisionOS and not iOS.
After the project is ready, you'll need to build and sign the application for deployment.
Build and Run:
In Build Settings, click Build and Run.
Create a "build" folder in the project root and select that as the folder.
Unity will automatically generate the Xcode project and open it in Xcode for you.
Sign the Project in Xcode:
In Xcode, click the root project icon on the left folder navigation menu and then navigate to Signing & Capabilities.
Enable Automatic Signing.
Select your Team as Brown University and set a valid Provisioning Profile and Certificate.
Ensure the Bundle Identifier matches your project’s identifier, such as com.brown.edu.<cslogin>.<nameofpackage>.
Connect AVP Device:
Make sure your AVP device is connected to your computer via the USB-C dongle.
If it is not detected on the top bar of XCode, put on the AVP and select popup to trust the computer.
Deploy to AVP:
Once the project is signed and the AVP connected, click Run icon in Xcode to deploy the app to the AVP platform.
Ensure the AVP device is connected and correctly selected as the target.
After deploying the application to the AVP platform, follow these steps to test:
Connect AVP Device:
Make sure your AVP device is connected to your computer.
Place Items on a Surface:
You will be prompted to place items on surfaces within the app. To do this:
Use a "slapping" gesture to place the items onto the surface. This involves physically interacting with the virtual objects and slapping them onto the detected surfaces with the entire hand.
Test the Application:
Once you've placed the items on the surface, you can interact with them!
Find the cannon, shoot the cannon, and take a screenshot by pressing both top (left and right buttons) on the top of your headset down at the same time.
Build Errors: Ensure all necessary Unity packages, including Polyspatial, are installed correctly.
Deployment Issues: Double-check that your AVP device is connected and the target platform is properly set in Xcode.
If you already have Unity setup from a prior class, skip to the add modules section of step 2.
Unity Account Setup
Visit Unity Student Plan portal
Click the Post-Secondary link
Sign in with Unity ID using Google sign-in with university email
Download Unity Hub
Unity Hub Setup
Go to Unity’s website
Sign in with Unity ID using Google sign-in with university email
Install required Unity version:
Open Unity Hub
When prompted, install the latest Unity Editor
Wait for Unity Editor to install
Then, navigate to Installs
Click gear icon next to Unity install and select Add modules
Add modules: visionOS Build Support, iOS Build Support
Get Unity Student license key
First, navigate to Preferences in Unity Hub
Go to Licenses tab, and if the educational license is already active, skip all remaining steps below and go directly to step 3
Otherwise go to ID Unity Organizations page
Select the organization with your name with underscores (i.e. jakobi_haskell)
Click the Subscriptions & Services section, then Unity Student
Near the bottom, there should be a window that contains your Serial Key (copy this)
In Unity Hub:
Go to Settings
Select License Management
Enter received license key
Install visionOS Simulator
Open Xcode
Go to Window > Devices and Simulators
Click the "+" button in the bottom left
Select "Add Simulator"
Choose "Apple Vision Pro" from the device type dropdown
Select the latest visionOS version
Give it a name (optional)
Click "Create"