Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question InputFeatureUsage field not showing in the inspector

Discussion in 'VR' started by hotlabs, Jun 27, 2021.

  1. hotlabs

    hotlabs

    Joined:
    Apr 11, 2021
    Posts:
    10
    I want to customise the behaviour of my Oculus Quest controller when interacting with the touch controller. I have a script which detects when a button on a specific controller is pressed.

    Code (CSharp):
    1.     ....
    2.     [Header ("Activation Controller")]
    3.     public XRNode controller = XRNode.RightHand;
    4.     public InputFeatureUsage<bool> activationButton = UnityEngine.XR.CommonUsages.primaryButton;
    5.     ...
    the script compiles but the `InputFeatureUsage` doesn't show in the inspector. I tried adding `[SerializeField]` but it doesn't work either.
     
  2. StayTalm_Unity

    StayTalm_Unity

    Unity Technologies

    Joined:
    May 3, 2017
    Posts:
    182
    Can you file a bug? This type can and probably should be tagged as [Serializable]. Adding a bug report helps keep us honest and put it on our schedule.
     
    hotlabs likes this.
  3. hotlabs

    hotlabs

    Joined:
    Apr 11, 2021
    Posts:
    10
    Sure I will, thanks