11-06-2024 06:00 AM
Hello,
I'm building a game for every platform, Steam and Meta, and it works that way so far. I've read Meta documentation, and it seems like I'm supposed to use Meta's "OpenXR" rig for some features like Dynamic Resolution .
Currently I'm using the Hurricane VR and Hexa Rig asset combo (VR - Physics Interactions Bundle | Physics | Unity Asset Store) for my player rig. I've attached a screenshot of the camera settings set up as a generic XR device.
If I wanted to use some oculus camera features, how would I organize that for my project? Do I need to make two rigs and switch between them depending on the platform??
11-06-2024 07:39 AM
Hi there @GamerReality,
Thank you for reaching out to Meta Quest Support! We love to see developers working on exciting new experiences for the Quest headsets, so we'd love to help you out. The simplest option might be to do as you said, and switch between rigs depending on the device.
If you are unable to find a solution you're happy with, please feel free to reach out to Meta Developer Support.
We wish you all the best for the development process!
11-08-2024 04:22 AM
Hi @GamerReality When you say you want to develop for every platform "Steam and Meta", I'm assuming that you're targeting PCVR, rather than standalone? I also use HurricaneVR and my current strategy is to just use their TechDemoXRRigOpenXR as a starting point, and the Unity OpenXR Plug-in, rather than the Unity OpenXR: Meta or the legacy Oculus XR Plugin
For info there's an interesting conversation about the the differences between the three on the Unity forums)
My thinking is that since Meta are obviously more focused on their standalone platform, there's little point directly targeting Meta headsets for PCVR. That store is dead (the focus is on the Horizon Store for standalone apps) and most people will be going through Steam. That doesn't mean you can't leverage some of the Meta SDKs. For example, I always import the Meta Audio SDK to make use of its excellent spatializer plug-in.
If you're building for both PCVR and standalone then things get more complicated. I'd suggest researching into solutions for building to multiple platforms. One option is to load in multiple XR Management package profiles (e.g., OpenXR for PC, Meta XR for Quest), configure each profile for each platform and then automate your build pipeline (there's a Unity API) switching between platform-specific configurations (including XR Management profiles) before each build. You'll need to use conditional compilation (e.g #if UNITY_XR_OPENXR
or #if UNITY_XR_META
) for platform-specific code. It's messy and can get complicated!
Another strategy that I've used in the past (back in the day of trying to build the same project to both GearVR and Google Cardboard) is to mirror your project folder (essentially just the 'Assets') but exclude files and folders across each one, depending on what's needed for each platform. It's cleaner but has its own limitations. There's an asset that can help the synchronisation process between the 'cloned' projects. https://assetstore.unity.com/packages/tools/utilities/ng-sync-folders-free-101015
Hope that helps!
11-08-2024 05:45 AM
Thank you for this! It confirms that the path ahead is messy and complicated. Yes, I want to support standalone and PCVR. I've been using the Open XR setup you outlined, and it's worked well for Quest so far, but if I wanted to push the Quest experience further, I know I would need to set up Meta's solution. Maybe it's something I can do later with more time and resources.
11-08-2024 06:43 AM - edited 11-08-2024 06:46 AM
For your standalone build I really recommend going all in on the Meta way of doing things, it's the only way you'll be able to access all the platform features. I think the jury's still out on whether to use OpenXR (with the Meta XR feature group ticked) or the Oculus XR Plugin. Not all SDK features are currently available under OpenXR but I think a lot of these are MR related (see: https://docs.unity3d.com/Packages/com.unity.xr.meta-openxr%402.0/manual/index.html). From what I understand, the intention is to have feature parity between both plugins but that's still not the case. So for example, as far as I know, dynamic resolution is only available under the Oculus XR Plugin.
But then I guess you also have to consider whether you also want to target other standalone headsets from Pico and HTC Vive...