Failing to run a build of the PolySpatial sample project with app mode set to VR (Fully Immersive space) on Xcode-beta 5


When building the sample found here with the App mode set to Virtual Reality (Fully immersive space), the build is successfully generated by Unity, but fail to run on Xcode-beta 5 with error:

Filename “UnityLibrary.swift” used twice: ‘…/Build/Libraries/com.unity.polyspatial.visionos/UnityLibrary.swift’ and ‘…/Build/Libraries/ARM64/Packages/com.unity.xr.visionos/Runtime/visionos/UnityLibrary.swift’

Removing the file manually from the ARM64 folder does not fix the issue.
Everything is working fine when the app mode is set to Mixed Reality.

Any ideas?



Thanks for the report, this should be resolved in future updates.

Currently the visionOS template is setup for PolySpatial / Mixed reality apps only.

For building a virtual reality app we recommend starting from an existing template like URP.

1 Like

By existing URP template do you mean starting a new visionOS project from scratch as in here? We are getting a SIGABRT on Thread 1 com.Apple.main-thread running PolySpatial 2.2 and xcode Beta 5 starting with an empty 3D URP Core project. This is also for a virtual Reality app.

We get this error building a visionOS from scratch.

Got it! Thanks for the update Dan.

Hello! What you are referring to is a different issue. I think this thread adresses it. VR Apps Fail to Run in Simulator. Essentially, settings the Device target to “Simulator” as stated here should allow you to run the build in VR mode on the Simulator.

1 Like