Making a cross platform app for Quest & VisionOS?

What would be the best way to create one code base that can be deployed to Quest and Apple Vision Pro with minimal changes?
My understanding is that the best approach would be to use Unity’s XR Interaction Toolkit, is that correct?

Bumping this because I have the same question. Also wondering how Unity PolySpatial fits into the overall XR Plugin Architecture?

yes, that is correct

same questin for me …thanks

I recently made an app for Q3 and AVP (same project, same scene even). It was an MR app using Polyspatial 1.2.3 so there are a few limitations just because this version of Polyspatial doesn’t exactly support the wide breadth of shaders that Q3/Android can support. Another thing I can say is to my knowledge, XR Hands is only supported in AVP fully immersive mode. So there will need to be some considerations when implementing AVP MR interactions (I got around this just by using the reference Pinch code that comes with the Polyspatial samples). Given this is the case, my assumption and just from basic testing is you will not be able to utilize the Unity input manager, at least for MR apps on the AVP. Though, theoretically you will be able to leverage it if you are doing a fully immersive app as it can use XR Hands.

The upshot is this: you can have cross-platform relatively easily for an MR app but it is best (effectively this is the only feasible route) to use device agnostic toolkits such as Unity XRI. One such example is by leveraging AR Foundation, I was even able to get more sophisticated XR capabilities such as scene understanding to be compatible between devices. If you were to use the Meta XR plugin I do not believe this will be compatible with AVP (understandably). Finally, something from my testing is the easiest way to get cross platform working is perhaps just having a rig for Quest and another for AVP. Then you can use preprocessor directives to enable each accordingly depending on build target.

1 Like

XR Hands works perfectly well in unbounded mode. XRI 3.0.4 also has samples for AVP

1 Like

Ah I just reread my post. Yes you’re correct, I do see API calls to XR hands in the sample as well. Do you know if a universal interaction profile can be used between the quest and AVP?

As I understand, you can just combine the two. The new input system in so tedious, I still don’t understand how it works. Or just load the profile depending on the platform, that’s what I’m doing between Android and VisionOS

Hi I’m trying to figure out how to make a universal app too. So basically what settings will I need to have my project working on both Quest and AVP with the same codebase? Should I just use the Unity XRI Toolkit and then manually change the plug in provider ( in this case like Meta OpenXR and AVP). Also can I only do this with PolySpatial Toolkit ? Does PolySpatial work for meta quest too? I’m sorry for do many questions but I’m so confused :sob:

It’s a bit complicated on one hand.
But for starters, yes I would use XR Interaction Toolkit.
Then for the XR Plugins, observe that you set those for each platform anyway.
Polyspatial, you just have in your project you don’t need to do anything directly with the plugin really. In my experience, it does not “block” or interfere with builds for Quest.

I would recommend to start with a sample scene from XR interaction Toolkit, which you can find in the package manager if you select XRI and select the tiny “samples” tab. Then try to build it to Quest and then AVP or something…

1 Like

Omg thank you so much :smiling_face::pray: so basically I just need to use XRI Toolkit to build everything in my project ( so some subsystems are similar between quest and AVP), have the PolySpatial package ( cause Vision pro need it right?) and only change the Plugin provider when I build and run it on the device? Feel free to correct me!! :sob:

1 Like

i am try to do for both platforms thsi ga too:

1 Like

Did you program the app for Quest and AVP through a Mac/visionOs? Or is it possible to do it on Windows Unity? Thank you :slight_smile: Sorry for the silly question I am also figuring out :slight_smile: