visionOS Project Configuration¶
In addition to the following configurations, please also pay attention to the settings in EasyAR Settings.
Apply to Apple Inc. for Enterprise API Entitlement¶
Attention
Please refer Building spatial experiences for business apps with enterprise APIs for visionOS to apply to Apple Inc. for the entitlement of the Enterprise App Camera API and obtain a license. (Please notice that this License is distributed by Apple Inc., it is not the same thing with EasyAR License).
Notice: The bundle ID used to create EasyAR Sense License Key and the Bundle ID specified in the Enterprise entitlement should be same.
Environment¶
visionOS 2.0 or later
Xcode 16.0 or later (compatible with the corresponding visionOS version) with visionOS simulator
Recommended Unity versions: 6000.0.23+
Unity visionOS App Mode¶
There are 4 app modes when using Unity on visionOS, which
- App modes supprted by EasyAR include,
Metal Rendering with Compositor Services
RealityKit with PolySpatial
Hybrid - Switch Between Metal and RealityKit
- App modes not supprted by EasyAR include,
Windowed - 2D Window
Please read Unity offcial documents for the differences and usage variance.
Install Unity Plugins¶
Unity plugins that are needed to install includes:
Unity 6+¶
- App Mode = Metal:
com.unity.xr.visionos (2.0.4+)
- App Mode = RealityKit/Hybrid:
com.unity.xr.visionos (2.0.4+)
com.unity.polyspatial (2.0.4+)
com.unity.polyspatial.visionos (2.0.4+)
com.unity.polyspatial.xr (2.0.4+)
The version numbers must be the same for all above plugins.
Unity 2023+¶
Some early releases of Unity 2023.x do not support building visionOS packages. Please use Unity 6.
Unity 2022.3.19+¶
- App Mode = Metal:
com.unity.xr.visionos (1.2.3)
- App Mode = RealityKit/Hybrid:
com.unity.xr.visionos (1.2.3)
com.unity.polyspatial (1.2.3)
com.unity.polyspatial.visionos (1.2.3)
com.unity.polyspatial.xr (1.2.3)
The version numbers must be the same for all above plugins.
Attention
Please do not use version 1.3.x. Version 1.3.x has been verified to have conflicts and not usable.
Build Platform Configuration¶
Switch Build Platform to visionOS:
Input System Configuration¶
Edit > Project Settings > Player
Set
Active Input HandlingtoInput System Package(New)
Unity will then prompt you to restart the project. Click Apply to activate the changes.
XR Plug-in Management Configuration¶
Edit > Project Settings > XR Plug-in Management
Plug-in Providers check
Apple visionOS
Edit > Project Settings > XR Plug-in Management > Apple visionOS
Select EasyAR supported
App Modeaccording to your needs
Add
World Sensing Usage DescriptionSet
Metal Immersion StyletoMixedSet
Reality Kit Immersion StyletoMixedCheck
IL2CPP Large Exe Workaround
PolySpatial Configuration¶
Note
Config if app mode is RealityKit or Hybrid.
Edit > Project Settings > PolySpatial
Set
Default Volume Camera Window ConfigtoDefault Unbounded ConfigurationCheck
Auto-Create Volume Camera
If you need custom Default Volume Camera Window Config, make sure to set its Mode to Unbounded
Delete Volume Camera in the scene (if it exist)
Delete
Volume Camerain the scene if it exist.(not recomannded) If you need a a unique custom
Volume Camera, please set itsWorld Transformtoidentity, and make sureModeof itsVolume Camera Window Configurationis set toUnbounded. Please refer to the relevant Unity documentations and use it only when you fully understand its purpose and implications.Volume Camerawithnon-identityWorld Transformis not supported.
Attention
Make sure to confirm there is NO Volume Camera in the scene or setup according to above description.
TextMesh Pro Configuration¶
Note
Config if app mode is RealityKit or Hybrid.
Edit > ProjectSettings > TextMesh Pro
Click
Import TMP Essentials
Note
RealityKit with PolySpatial currently only supports TextMesh Pro for rendering text.
Bundle ID¶
Set visionOS Bundle ID in Player Settings. Bundle ID should be same with the one when creating License Key and should be consistent with the Bundle ID specified in the Enterprise entitlement applied to Apple
A window will popup if the License Key is invalid (e.g. when bundle id is not matched)
The application will fail to work if you continue to build when this window shows. Please check and fix problems according to messages in the window.
Note
In some special situation when you want to initialize EasyAR manually using scripts, you do not use the license key in the Settings asset. In this case, you can choose Continue and don't warn me again , or disable EasyAR Sense License > Verify When Build option in EasyAR Settings to disable verification in the build process.
Usage Description Configuration¶
Configuire different Usage Description according to Permissions settings in EasyAR Settings.
And Location Usage Description if Location permission is on, or the build will fail.
Note
Unity currently only has the Location Usage Description field in the PlayerSettings for iOS. The Location Usage Description field set in iOS PlayerSettings is also effective in VisionOS.
Camera Permissions (XCode Project)¶
Generate XCode project with Unity, then in the Signing & Capabilities page, click +Capability, add Main Camera Access
Note
This item will not appear if the enterprise entitlement has not been successfully applied.
Copy the obtained Enterprise.license file to the XCode project directory and add it to the XCode project.
EIF Default Path Read Permission (XCode Project)¶
Note
Not require. Only needed if record eif using default path and need to sent it to a computer.
If you need to record EIF using default path and send it to a computer or other device via the Files app on Vision Pro, you need to add the following fields to the Info.plist,
Add
LSSupportsOpeningDocumentsInPlaceand set its value totrueAdd
UIFileSharingEnabledand set its value totrue
Note
It is normal that the displayed text is not the same as you insert to the plist.