Search Unity

Stop Oculus Rift S from entering sleep mode when removing headset?

Discussion in 'Scripting' started by saifshk17, Feb 15, 2020.

  1. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    488
    Is there a way to stop the device (Oculus Rift and Oculus Rift S) from entering sleep mode after removing headset? I have added this script but does not work

    Code (CSharp):
    1. public class SetBackground : MonoBehaviour
    2. {
    3.  
    4.     void Awake()
    5.     {
    6.         Application.runInBackground = true;
    7.     }
    8.     // Start is called before the first frame update
    9.     void Start()
    10.     {
    11.         Application.runInBackground = true;
    12.         Screen.sleepTimeout = SleepTimeout.NeverSleep;
    13.     }
    14. }
     
    Deleted User and tlskillman like this.
  2. allaith

    allaith

    Joined:
    Jan 13, 2017
    Posts:
    5
    Did you find a solution? I hate the standby mode as well
     
  3. saifshk17

    saifshk17

    Joined:
    Dec 4, 2016
    Posts:
    488
    Nope. Upgrade to XR management system. It will help.