VRMADA / ultimatexr-unity

UltimateXR is a free, open source framework that facilitates the creation of VR applications.
https://www.ultimatexr.io
MIT License
467 stars 60 forks source link

Quest 3 support for Android builds #60

Closed lukakldiashvili closed 7 months ago

lukakldiashvili commented 8 months ago

Issue: Current solution for fetching HeadsetDeviceName fails to return correct value for Quest 3 when built for the device. That value being Oculus Headset2.

Context: Unity 2022.3.16, Meta All-in-one 60, XR Management 4.4.0

Solution: For Android builds only, map device name (fetched from SystemInfo) to the correct value manually, if present in the mapping dictionary.

Note: Since this is somewhat of a workaround, I kept the changes very minimal. I would like to hear your suggestions for potentially better way of mapping the values and maybe better separation of concerns.

entromp commented 7 months ago

Hi @lukakldiashvili,

Thanks for taking the time to submit this pull request :) Based on some discussions on our Discord we had another option in mind for now, which is looking for the Android headset name too. So we still use UxrTrackingDevice.HeadsetDeviceName but the Quest3 input returns the controller names if HeadsetDeviceName matches with any of the names, including the new one ("Oculus Headset2"). You can see the change here: https://github.com/VRMADA/ultimatexr-unity/commit/b51f924f154416085b1fb4eabff98c4d342a7026