title: How do I get input from the Oculus remote?
body: <p>I am trying to figure out how to use the oculus remote in Unity3D 5.3.4f. I've found some  <a href="https://developer.oculus.com/documentation/game-engines/latest/concepts/unity-ovrinput/#unity-ovrinput-rift-remote" rel="nofollow">documentation</a> about OVR mapping, but I can't seem to figure it out.</p>
  
  <p>What I want to achieve is when the middle button(Button.One) is clicked.</p>
  
  <p>What I now use is this line of code</p>
  
  <pre><code>if (OVRInput.GetUp(OVRInput.Button.One))
      {
          Debug.Log("remote click");
      }
  </code></pre>
  
  <p>But when I run the application I get this error.</p>
  
  <blockquote>
    <p>NullReferenceException: Object reference not set to an instance of an object
    OVRInput.GetUp (Button virtualMask, Controller controllerMask) (at Assets/OVR/Scripts/OVRInput.cs:600)
    menuButtonHandler.Update () (at Assets/menuButtonHandler.cs:136)</p>
  </blockquote>
  
  <p>Which can be found in this script</p>
  
  <pre><code>/// &lt;summary&gt;
  /// Gets the current up state of the given virtual button mask with the given controller mask.
  /// Returns true if any masked button was released this frame on any masked controller and no other masked button is still down this frame.
  /// &lt;/summary&gt;
  public static bool GetUp(Button virtualMask, Controller controllerMask = Controller.Active)
  {
      return OVRManager.input.GetResolvedButtonUp(virtualMask, RawButton.None, controllerMask);
  }
  </code></pre>
  
  <p>Has anyone used to Oculus remote controller before in unity and can help me out?</p>
  
  <p>Thank you,</p>
  
  <p>Johan</p>