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 Detect power button of Oculus Quest in Unity

Discussion in 'XR Interaction Toolkit and Input' started by fmadueno, Jun 22, 2023.

  1. fmadueno

    fmadueno

    Joined:
    Oct 11, 2022
    Posts:
    1
    Hi, maybe this is a silly question but...

    Is there any way to detect the input of the power button of Oculus Quest 2 and use it like a confirmed click in a Unity app?

    Thanks!
     
    DhiaSendi likes this.
  2. DhiaSendi

    DhiaSendi

    Joined:
    May 16, 2018
    Posts:
    42
    Did you figured out a way to achieve that?
     
  3. ericprovencher

    ericprovencher

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    145
    The best you could do I believe is check for the application focus, which is lost when the user presses that button.
     
    FarmerInATechStack likes this.
  4. DhiaSendi

    DhiaSendi

    Joined:
    May 16, 2018
    Posts:
    42
    Thank you for your reply @ericprovencher
    Is there a way to trigger that button via script?
     
  5. ericprovencher

    ericprovencher

    Unity Technologies

    Joined:
    Dec 17, 2020
    Posts:
    145
    FarmerInATechStack likes this.
  6. FarmerInATechStack

    FarmerInATechStack

    Joined:
    Dec 28, 2020
    Posts:
    54
    Whoa - really interesting tip here. I wasn’t sure if a built-in solution existed. This is interesting to consider. Thanks @ericprovencher for the tip and @fmadueno for the ask.