I was expecting to be able to run a Unity build (as a framework) on the new Apple’s Vision Pro simulator, released yesterday. After all, Apple says it’s able to run iOS Apps, it’s based on iOS, and I’m running the same iOS target (not a new one). I was hoping somehow that the Unity framework would be compatible as well. But I guess it’s not, at least I did not figure it out.
My question is, will a new Unity release include the option to add “Vision Pro” as a target device, within the iOS SDK target, just like it happens with iPad, when building for iOS? Something like iPhone+iPad+VisionPro below:
I know Vision Pro uses a different SDK, but Xcode somehow allows you to add it as a destination device within the same iOS target, no needing a new one:
It would be convenient to build “universal” binaries (if it’s even possible). Otherwise I guess I would need to create different targets for different platforms, and build the Unity framework twice for the same Xcode project?
But then again, I don’t even know what I’m saying, and I’m not sure if it even makes sense. Maybe I’m missing something, and it needs to be done in a different way.
Just wondering if anyone has any knowledge on this.
Thanks!
note: I’m not trying to run the Xcode project that Unity generates. Instead, I have it added as a framework to a workspace, because I need native code on top of it, and I reference it as a framework to present the game when I need to. Just in case it’s relevant.
I’m also trying to see if our game works okay on the Vision Pro simulator (as per Apple’s instructions), in the “designed for iPad” mode, but I guess it’s not possible?
Am I missing some step, or is it simply impossible to do using Unity 2021?
this is convoluted for now (i know, i know) what worked for me:
in new xcode they are moving away from x64 simulators (we are working on arm64 simulator libs), so first of all you would need to enable rosetta simulator targets:
Product > Destination > Destination Architectures > Show Rosetta Destinations
in build settings for app you need to tweak supported platforms to have visionOS (didnt work for me with “Any Target” for some reason)
i did build and run and it failed to run for some reason (no matter what i try) - but it did install app on simulator and i could run from here directly (alas, atttaching debugger does not work)
while this is quite convoluted setup - this works for now (we are working on making all this better)
Thanks for the tips, I have to admit I didn’t think the simulator would still need rosetta.
But I’m giving up. I can’t even get the normal iOS simulators work with our game (while empty projects do work), so I’m guessing there’s an even slimmer chance of the VisionOS simulator working.
In general in the last 10 years our game has only sporadically played well with the iOS simulators, I guess this isn’t one of those times. Which is a bit of a bummer, since I would have liked to submit our game to be considered as “playing well with VisionOS”, but I guess I can’t do that.
In general in the last 10 years our game has only sporadically played well with the iOS simulators
hm that’s weird - lately simulators were quite stable for me. But yeah - the situation with rosetta is painful - we are working on resolving this no worries
I’m currently having an issue with the visionOS (yes, I know, experimental) support in 2022.3.5f1.
I’m trying to run an exported app on the VisionOS simulator, but getting this error in Xcode:
If, on the other hand, I try to export an app by selecting
Project Settings > Player > Other Settings > Configuration > Target SDK
to “Simulator SDK”, I get this error in the Unity Editor (i.e., it doesn’t make it to Xcode):
Building xrsimulator_build/Libraries/libiPhone-lib.dylib failed with output:
The source path /Applications/Unity/Hub/Editor/2022.3.5f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/libiPhone-lib-amd64-il2cpp.dylib does not exist.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
Building xrsimulator_build/Libraries/libil2cpp.a failed with output:
The source path /Applications/Unity/Hub/Editor/2022.3.5f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/libil2cpp-amd64-net40.a does not exist.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
Building xrsimulator_build/Libraries/baselib.a failed with output:
The source path /Applications/Unity/Hub/Editor/2022.3.5f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/baselib-amd64.a does not exist.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
BuildFailedException: Player build failed: 3 errors
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/build/output/unity/unity/Editor/Mono/Modules/BeeBuildPostprocessor.cs:718)
UnityEditor.VisionOS.VisionOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <0c1edcfdb4884c8281b11eb78f3ba24d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
Build completed with a result of 'Failed' in 11 seconds (11148 ms)
4 errors
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
I’m on an M1 mac mini, XCode 15 beta 4, Unity 2022.3.5f1.
I know this is super early days but I could really use a flow from Unity into the Vision Pro Simulator.
I also have same problem. First, when build, warn with " ‘TARGET_OS_XR’ is not defined " and I change TARGET_OS_XR to TARGET_OS_VISION. But now I have same error
" Building for ‘xrOS-simulator’, but linking in object file ~~ built for ‘xrOS’ "
error. Rossetta doesn’t work. And if I change Target SDK to “Simulator SDK” then xcode build failed.
I run with xcode 15.5 beta and visionOS 1 beta 2 Simulator Runtime. M1 and Unity 2022.3.5f1.
I’m experiencing the same issue as Andreus and phak. Please give us some guidance here because we’re trying to submit our app for the Vision Pro summit and there is no detailed info on how to do this. The WWDC videos just say ‘Set the Build Target’ and ‘Select the XR Plugin’. Couldn’t be more vague.
Hi all – we’re working on getting a visionOS specific forum for discussing the base platform support (for windowed/slate mode). For now, in order to build with the base visionOS platform, you need Xcode 15 beta 2 (lots of things are changing very quickly in the betas, i.e. OS define names!), and Apple Silicon machines. We hope to have both issues resolved very soon.
unfortunately this doesn’t seem to work well for me - I get the same error messages “lib-amd64-il2cpp.dylib” etc, when building for the simulator, using a M1 Mac. Is there a something we’re missing?
Thanks for the ‘official’ response!
Ok, now that I read this post again as use Xcode 15 Beta 2 exactly on a M1/2 machine, I really got rid of the link error (I used Beta 5 before). Now I get a valid app in the Simulator (but it doesn’t work properly yet…).
Thanks for this, now we are one step further!
How do you get past the missing libraries?
When I build for simulator on an M1 machine I get the following build errors :
/Applications/Unity/Hub/Editor/2022.3.6f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/baselib-amd64.a does not exist.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)
Building /Users/frogameleon/Desktop/Visions/Libraries/libil2cpp.a failed with output:
The source path /Applications/Unity/Hub/Editor/2022.3.6f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/libil2cpp-amd64-net40-wbarriers.a does not exist
/Applications/Unity/Hub/Editor/2022.3.6f1/PlaybackEngines/VisionOSPlayer/Trampoline/Libraries/libiPhone-lib-amd64-il2cpp.dylib does not exist.
Probably not the best solution but you can find these libraries in the iOS Platform Playback Engines. I copied them over to the Vision Pro platform directory and it certainly got me a little further. I can install a build on the simulator in Xcode but it crashes on launch.
I have a native project building and bundling Unity as a framework and loading it via a SwiftUI view in immersive mode, but upon loading the Unity player view I get a crash (metal buffer). When running the unity framework as a stand alone build on visionOS via the windowed app it runs.
I would love to know what the missing link is to get the hybrid rendering modes to work. It seems like we would need to provide a rendering context FROM native to unity to allow these modes?
Hey @drunknbass , we are also using Unity as a framework but are struggling to get it built for the visionOS simulator at all, seeing missing library and other ambiguous errors. Would you mind providing a few steps or info on how you got this running?