Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Jose's avatar
Jose
Heroic Explorer
12 years ago

Auto dismiss health warning in Unity (unitypackage)

I know a lot of you guys want to have the health warning removed. I don't know how to remove it, but I got it to auto dismiss. After a few seconds, the warning disappears on its own. No need to press the anykey button.

Look at line 111 in OVR\Scripts\OVRDevice.cs

if (HMD != null && Input.anyKeyDown && HMD.GetHSWDisplayState().Displayed)


and change it to:

if (HMD != null && HMD.GetHSWDisplayState().Displayed)


For those who don't want to edit any files, I attached a zip file containing a unitypackage that you can import into your project. Use it to overwrite OVRDevice.cs after backing up your project first.

auto-dismiss-hsw.zip

7 Replies

Replies have been turned off for this discussion
  • mariom's avatar
    mariom
    Honored Guest
    Great tip! The warning becomes really annoying after a while and the default script doesn't accept "any key" but space, and most of the demos I've seen so far don't change this, so thanks ;)
  • D3x's avatar
    D3x
    Honored Guest
    This got really annoying after a while, I don't know how they thought this was a great idea to have and everyone will want to start their project with that Warning displaying...
  • The HSW can be auto-dismissed in the latest (v0.4.4) version of the Unity 4 Integration plugin by changing:

    Line 521 of OVR/Scripts/OVRManager.cs from
    if (isHSWDisplayed && Input.anyKeyDown)

    to
    if (isHSWDisplayed)
  • bzor's avatar
    bzor
    Honored Guest
    this doesn't seem to be working now, is there a new method for 0.5.0.1?
  • SAOTA's avatar
    SAOTA
    Honored Guest
    hit win + r

    paste

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oculus VR, LLC\LibOVR" /v "HSWToggleEnabled" /t REG_SZ /d 1

    open oculus configuration utility

    click advanced

    disable health and safety warning.
  • "SAOTA" wrote:
    hit win + r

    paste

    REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oculus VR, LLC\LibOVR" /v "HSWToggleEnabled" /t REG_SZ /d 1

    open oculus configuration utility

    click advanced

    disable health and safety warning.


    Thanks for the tip. I still don't see why this isn't a default option for developers