How to setup UE5 for visionOS
Update: just use Epic games tutorial
Setting Up Unreal Engine 5.4 for Apple Vision Pro Development
Unreal Engine 5.4 provides experimental support for full-immersion experiences on Apple Vision Pro. Below are basic instructions for starting, follow the Unreal Engine 5.4 VisionOS Build on Apple Vision Pro tutorial for a more complete walkthrough. Or this one from Epic Games.
1. Install Unreal Engine 5.4 or Later: Ensure you have Unreal Engine version 5.4 or newer, as this version includes the necessary support for Vision Pro development. You can download it from the Epic Games Launcher.
2. Download Vision Pro SDK and Xcode.
Prerequisites:
Apple Vision Pro paired with your Mac
Apple developer account
Xcode 15.3 installed
Step 1: Set Up Xcode
Download Xcode 15.3 from Apple's developer site, unzip, and install it.
Rename any old version of Xcode to avoid conflicts.
Once ready, open Xcode 15.3 and navigate to Settings.
Ensure iOS 17.4 and VisionOS 11 are enabled.
Open Xcode and make sure it's set up correctly before proceeding.
Step 2: Unreal Engine Preparation
Go to the Unreal Engine GitHub and download version 5.4 as a ZIP file.
Extract the folder and move it to an external drive if preferred (e.g., Unreal Engine 5.4, Unreal Engine 5.5, etc.).
Step 3: Terminal Setup
Open Terminal and run:
sudo spctl --master-disableEnter your password when prompted. This command allows project files to run without extra verification.
Go to System Settings > Privacy & Security, and ensure apps are allowed from anywhere.
Step 4: Set Up Unreal Engine 5.4
Navigate to the Unreal Engine 5.4 directory and run Setup.command to download required dependencies.
Run GenerateProjectFiles.command to create the necessary project workspace files.
Open Xcode and select the Unreal Game target. Change it to Unreal Editor.
Navigate to Product > Build to compile the project. This will take a while.
Once complete, go to Binaries > Mac and open Unreal Editor.app.
Allow permissions as prompted for the external drive.
Step 5: Create a VR Project
Once the editor is open, select Games > Virtual Reality Template.
Set up the directory where the project will be saved.
Go to Edit > Plugins and enable OpenXR Vision OS (it’s in beta).
Enable Vision Pro Platform:
Platforms > Supported Platforms > Check Vision OS.
Turn off Anti-Aliasing to prevent performance issues (optional).
Step 6: Adjust Project Settings
Turn off iOS Mobile Rendering and enable Metal Desktop Renderer in Project Settings.
Add your Dev Team ID and Bundle ID in Xcode Info (e.g., com.company.app).
Add required PList permissions in Additional PList Data under project settings.
Convert your project to a code project:
Tools > New C++ Class > Create a new class and restart the editor when prompted.
Turn off Dynamic Shadows if experiencing performance issues (optional).
Step 7: Packaging and Deploying
Go to Package Project > Platforms > Vision OS and package the build.
Select a location (e.g., project directory). This will take time.
Once successful, locate the generated app.
Open Xcode > Window > Devices and Simulators > Select Apple Vision Pro.
Click the + button to add your app. Deploy it to the Vision Pro headset.
Debugging (Optional)
If you need detailed logs and debugging:
Open the Vision OS workspace in Xcode.
Ensure the correct target is Apple Vision Pro.
Hit the Play button to build and push the app.
Unlock your headset if required for deployment.
Debugging takes longer, but it is crucial for investigating crashes and missing data.
Notes for Speed Optimization
For quick testing, deploying directly through Devices and Simulators is faster than rebuilding each time in Xcode.
Dynamic shadows can be turned off for better performance, especially when running multiple complex objects.