Search Unity

Complete loss of XR input in 2020.1 except for 'isTracked'

Discussion in 'Editor & General Support' started by Charlicopter, Oct 29, 2020.

  1. Charlicopter

    Charlicopter

    Joined:
    May 15, 2017
    Posts:
    125
    Migrated to 2020.1 + XR Plugin Manager package + OpenVR XR Plugin.

    Noticed button inputs stopped working with Index && Vive controllers.
    Ran this debugging function and the only boolean output is "isTracked = true" ...so no buttons.
    There are also no float values...so no joysticks, trigger squeezes, etc.

    Tracking still works.
    Any features with Vectors are still present and working.

    Code (CSharp):
    1.     private void DebugXRFeatures()
    2.     {
    3.         List<InputDevice> inputDevices = new List<InputDevice>();
    4.         InputDevices.GetDevices(inputDevices);
    5.  
    6.         foreach (InputDevice device in inputDevices)
    7.         {
    8.             UnityEngine.Debug.Log(device.name);
    9.  
    10.             List<InputFeatureUsage> featureUsages = new List<InputFeatureUsage>();
    11.  
    12.             device.TryGetFeatureUsages(featureUsages);
    13.  
    14.             foreach (InputFeatureUsage featureUsage in featureUsages)
    15.             {
    16.                 UnityEngine.Debug.Log(featureUsage.name);
    17.  
    18.                 if (featureUsage.type == typeof(bool))
    19.                 {
    20.                     bool boolValue;
    21.  
    22.                     if (device.TryGetFeatureValue(featureUsage.As<bool>(), out boolValue))
    23.                     {
    24.                         UnityEngine.Debug.Log(string.Format($"Bool feature '{featureUsage.name}' = {boolValue}"));
    25.                     }
    26.                 }
    27.                 else if (featureUsage.type == typeof(float))
    28.                 {
    29.                     float floatValue;
    30.  
    31.                     if (device.TryGetFeatureValue(featureUsage.As<float>(), out floatValue))
    32.                     {
    33.                         UnityEngine.Debug.Log(string.Format($"Float feature '{featureUsage.name}' = {floatValue}"));
    34.                     }
    35.                 }
    36.                 else if (featureUsage.type == typeof(Vector3))
    37.                 {
    38.                     Vector3 vector3Value;
    39.  
    40.                     if (device.TryGetFeatureValue(featureUsage.As<Vector3>(), out vector3Value))
    41.                     {
    42.                         UnityEngine.Debug.Log(string.Format($"Vector3 feature '{featureUsage.name}' = {vector3Value}"));
    43.  
    44.                     }
    45.                 }
    46.             }
    47.         }
    48.     }
     
    Last edited: Oct 29, 2020
    teh_turtle likes this.
  2. KCGames47

    KCGames47

    Joined:
    Nov 3, 2014
    Posts:
    39
    Yeah... it seems that the UnityXR Plugin Management system doesn't work with those anymore... except for oculus, still works for me..

    For now I'm using SteamVR plugin for Vive/Index and Oculus Plugin/UnityXR for Oculus
     
  3. teh_turtle

    teh_turtle

    Joined:
    Oct 2, 2020
    Posts:
    1
    I'm also running into this issue on 2019.4.11
     
  4. BobMCleod

    BobMCleod

    Joined:
    Sep 15, 2017
    Posts:
    7
    Still not working in 2020.3.12f1. Has anyone heard anything, will this ever get fixed?