04-12-2022 05:14 AM
Hello,
Having Oculus + com.unity.xr.oculus packages breaks when switching to GameCoreXboxOne platform.
Playstation and NintendoSwitch work fine.
Initial proble is the main package references nonexisting namespaces on that platform
Assets\Oculus\VR\Scripts\OVRCommon.cs(34,31): error CS1069: The type name 'XRDevice' could not be found in the namespace 'UnityEngine.XR'.
this can be fixed by wrapping that code with
#if (ENABLE_VR_MODULE && ENABLE_VR) #endif
Even though now the code compiles in the editor, when you try to build the game for XboxOne, the script breaks with various missing assembly references.
Library\PackageCache\com.unity.xr.oculus@1.12.0\Runtime\InputSystem\DeviceLayouts.cs
Like
The type or namespace name 'XRHMD' could not be found (are you missing a using directive or an assembly reference?)
'OculusTouchController.FinishSetup()': no suitable method found to override
The type or namespace name 'XRController' could not be found (are you missing a using directive or an assembly reference?)
We are using 2019.4.31f with the latest packages.
Is it possible to have Oculus package installed when targeting GameCore platforms? (XboxOne and XboxSeries)