Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Quest 2 OpenXR Interaction Profiles?

Discussion in 'VR' started by myama, Jul 27, 2023.

  1. myama

    myama

    Joined:
    May 2, 2014
    Posts:
    14
    When building for Quest 2 Android, when I add these two Interaction profiles, it breaks motion controller support on my Quest 2:

    Oculus Touch Controller Profile
    Meta Quest Touch Pro Controller Profile

    If I take out the Meta Quest Touch Pro Controller Profile and have the single Oculus profile, the motion controller works.

    Question:
    Is this a bug? Should I only have the Oculus profile? If so will a Quest Pro controller work? Because logically I would think I’d add both profiles and let Unity figure out which controller it is using.

    Reproduction Steps:
    -Create new 3D URP project with Unity 2022.3.5f1
    -Add these Packages:
    OpenXR Plugin 1.8.2
    XR Plugin Management 4.4.0
    XR Interaction Toolkit 2.4.3
    Samples: Starter Assets
    -Setup XR Plug-in Management with OpenXR (Android tab)
    -Add both interaction profiles listed above
    -in OpenXR Feature Groups check Meta Quest Support

    Make an android build with the DemoScene provided in Samples/XR Interaction Toolkit/2.4.3/Starter Assets

    In the log this error is repeated over and over:
    [Error ] xrSyncActions: XR_ERROR_PATH_UNSUPPORTED

    Question 2:
    Should I install the Oculus XR Plugin as well as the OpenXR Plugin? I’m not sure if I need both and what this would affect

    Thank you for any help.
    Mark
     

    Attached Files:

  2. JordyBan

    JordyBan

    Joined:
    Aug 16, 2021
    Posts:
    2
    Running into the same problem at the moment... any updates on this? Thanks!
     
  3. myama

    myama

    Joined:
    May 2, 2014
    Posts:
    14
    I have just been keeping the Oculus Touch Controller Profile as the only profile for now. Not sure what to do to support the Quest Touch Pro controller.
     
  4. aquadragon3d

    aquadragon3d

    Unity Technologies

    Joined:
    Sep 20, 2021
    Posts:
    11
  5. JordyBan

    JordyBan

    Joined:
    Aug 16, 2021
    Posts:
    2
    If there are some people who can't wait for v57, and need to get it working right now. There is a workaround by enabling the Meta Quest Touch Pro Controller Profile in runtime when needed. I would not recommend this at all, but wanted to share anyway.

    Something like the following would work.

    Code (CSharp):
    1.     public bool IsDone { get; private set; }
    2.     private const string META_QUEST_PRO_DEVICE_NAME = "Meta Quest Pro";
    3.     private const string META_QUEST_TOUCH_PRO_CONTROLLER_NAME = "Meta Quest Pro Touch Controller OpenXR";
    4.     private const string META_QUEST_TOUCH_PRO_CONTROLLER_PROFILE_NAME = "MetaQuestTouchProControllerProfile Android";
    5.  
    6.     public IEnumerator EnableMetaQuestTouchProControllerProfileIfNeeded()
    7.     {
    8.         var inputDevices = new List<InputDevice>();
    9.         while (inputDevices.Count == 0)
    10.         {
    11.             InputDevices.GetDevices(inputDevices);
    12.             yield return null;
    13.         }
    14.  
    15.         var isUsingMetaQuestPro = SystemInfo.deviceName.Equals(META_QUEST_PRO_DEVICE_NAME);
    16.         var isUsingMetaQuestProTouchController = inputDevices.Any(controller => controller.name.Equals(META_QUEST_TOUCH_PRO_CONTROLLER_NAME));
    17.         if (isUsingMetaQuestPro || isUsingMetaQuestProTouchController)
    18.         {
    19.             XRGeneralSettings.Instance.Manager.StopSubsystems();
    20.             XRGeneralSettings.Instance.Manager.DeinitializeLoader();
    21.  
    22.             EnableOpenXRInteractionFeature(META_QUEST_TOUCH_PRO_CONTROLLER_PROFILE_NAME);
    23.  
    24.             yield return StartCoroutine(XRGeneralSettings.Instance.Manager.InitializeLoader());
    25.             XRGeneralSettings.Instance.Manager.StartSubsystems();
    26.         }
    27.  
    28.         IsDone = true;
    29.     }
    30.  
    31.     private void EnableOpenXRInteractionFeature(string featureName)
    32.     {
    33.         var interactionFeature = OpenXRSettings.Instance.GetFeatures<OpenXRInteractionFeature>().Single(feature => feature.name.Equals(featureName));
    34.         interactionFeature.enabled = true;
    35.     }
    For some reason 'GetDevices' doesn't return controllers when using the Meta Quest Pro, so I also check for the devicename. That way the Meta Quest Pro and Pro Controllers on Quest 2 will enable the profile.