Skip to main content
Up and Coming
July 26, 2014

Getting rid of health and safety warning

What is the proper way to get rid of the health and safety warning in Unity?
In OVRDevice.cs, I tired commenting out this:

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

and adding this to the end of Awake():

HMD.DismissHSWDisplay();


But that only works in the Editor but in the standalone version the head tracking stops working and the warning is not removed.

    261 replies

    kojack
    Honored Contributor
    January 13, 2015
    "lamour42" wrote:
    To get it in binary form I currently have to dump the memory it occupies when running one of the SDK samples. I would rather not do this again with every new SDK version.

    Or just use the following little program:
    #include "fstream"
    typedef unsigned char uint8_t;
    #include "healthAndSafety.tga.h"

    int main()
    {
    std::fstream out("healthAndSafety.tga", std::ios::out | std::ios::binary);
    out.write((const char*)healthAndSafety_tga, sizeof(healthAndSafety_tga));
    return 0;
    }


    Having the file as an actual texture would of course be more convenient for client rendering people though.
    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3
    Up and Coming
    January 15, 2015
    "Fredz" wrote:
    The solution has already been given here : https://developer.oculus.com/forums/viewtopic.php?f=37&t=12247


    Link doesn't seem to work.

    What is the best way to disable this in Unity with Oculus SDK 0.4.4?

    Thanks!
    Inspiring
    January 15, 2015
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Inspiring
    January 15, 2015
    Please read the documentation. You can disable the warning for development purposes.

    Starting with release 0.4.3, the Health and Safety Warning can now be disabled via the Oculus Configuration
    Utility. Before suppressing the Health and Safety Warning, please note that by disabling the Health and
    Safety warning screen, you agree that you have read the warning, and that no other person will use the headset
    without reading this warning screen.

    To use the Oculus Configuration Utility to suppress the Health and Safety Warning, a registry key setting
    must be added for Windows builds, while an environment variable must be added for non-Windows builds.
    For Windows, the following key must be added if the Windows OS is 32-bit:
    HKEY LOCAL MACHINE\Software\Oculus VR, LLC\LibOVR\HSWToggleEnabled

    If the Windows OS is 64-bit, then the path will be slightly different:
    HKEY LOCAL MACHINE\Software\Wow6432Node\Oculus VR, LLC\LibOVR\HSWToggleEnabled
    Setting the value of ”HSWToggleEnabled” to 1 will enable the ”Disable Health and Safety Warning” checkbox
    in the Advanced Configuration panel of the Oculus Configuration Utility. For non-Windows builds,
    setting an environment variable named ”Oculus LibOVR HSWToggleEnabled” must be created with the
    value of ”1”.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Participant
    January 15, 2015
    "jherico" wrote:
    "nuB" wrote:
    "LaeusVR" wrote:
    ...The only thing it's good for is making lawyers happy...


    No, I don't think there is actually any laws behind this warning screen, I believe it was just an idea by someone at Oculus, who, growing up with warnings, sees them as common place, and felt one should be on this product/service.


    No, the HSW is a requirement of the SDK license, which means the legal department at Oculus was involved (individual devs don't just take it upon themselves to change the licensing requirements).

    Also it's not about laws (not in the sense of criminal law), but rather about civil liability. Suppose I do something stupid while wearing the Rift and injure myself. I'm litigious, so I decide to sue someone. I'm not likely to sue the indie game maker, since a win won't actually do anything but bankrupt the developer without even paying for my legal fees. I'm much more likely to sue Oculus because being backed by Facebook they have deep pockets. Oculus in turn can point to the health and safety warning requirement of the SDK, meaning that the burden of liability is either placed on the software developer (because they failed to display the warning) or me (because I failed to heed the warning).

    You can argue the stupidity of the requirement, or the stupidity of tort law until you're blue in the face (or rather, your fingers are worn down to stumps). It makes no difference to me. Since it's a licensing requirement you can either comply or you can risk your right to make software with the Oculus SDK.

    I agree that as developers it's annoying to have to deal with the warning tens or hundreds of times a day, but I've already explained several times on the forum how to disable the warning in debug builds (which is pretty trivial to do), so really you don't have to.


    The licensing requirement, like the HSW screen, were choices chosen by someone arbitrarily at Oculus.
    Because something is viewed as 'official', often garners the association of 'cannot be wrong'.
    Civil liability? That's a can of worms I can argue both ways in this argument, for and against itself.
    Up and Coming
    January 19, 2015
    I think the requirement should be changed so that developers are required to display the Health and Safety warning (the SAME message) in their OWN way, similar to how Elite: Dangerous does it with a nice display, rather than this ugly thing stuck to your face.

    It's not just about developing, I don't think anyone likes having it stuck on their face when they load a game. I don't see why there is anything wrong with developers being able to show the same message using their own UI, in a way that fits their project..
    Participant
    February 9, 2015
    "For non-Windows builds, setting an environment variable named ”Oculus LibOVR HSWToggleEnabled” must be created with the value of ”1”.

    I use OS X Mavericks, how can one set up this environment variable containing spaces in its name?? It seems so far it can't be done and I would gladly appreciate to remove the warning when development the application. Any recommendation?

    I looked over the following threads but in vain:
    - https://discussions.apple.com/thread/6452383?start=0&tstart=0
    - http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x-slash-etc-slash-launchd-dot-conf/
    Participant
    February 9, 2015
    I've found in the doc that the variable name is Oculus_LibOVR_HSWToggleEnabled so previous issue is fixed.

    However, the value of the variable has no effect on the warning message. I use OS X Mavericks with Oculus firmware 0.4.3 and Unity 4.6.

    This line was added in a launchd.conf file in /etc:
    setenv Oculus_LibOVR_HSWToggleEnabled 0

    The result of "export" shows:
    declare -x Oculus_LibOVR_HSWToggleEnabled="0"

    Thus the variable seems to be set correctly. Any help?
    Up and Coming
    February 9, 2015
    You know what I find amusing...

    In all the time I've used the Rift I don't think I've ever read what that screen says once.

    I honestly can't even tell you a single word on it apart from "press any key to continue" and that's only because pressing any key doesn't work for 10 seconds or so and I've read the last line so many times trying to understand why it wasn't working (I soon learnt about the built in delay)

    I know all this has been said before but for a company that's putting so much effort into making a whole experience (VR or not) comfortable for the user that screen breaks basic rules in the VR book (to close to read comfortably, stuck in one place) in addition to not following simple computer/user interaction basics (telling them to press any key even while pressing any key doesn't work)

    I'm so grateful when I find a demo that doesn't have this screen on it, makes the hole experience better for it and can't wait for a new version of the SDK that improves on the current mess.
    New Participant
    March 9, 2015
    Any solution for Oculus SDK 0.44 / Unity 4.6 running on OSX?
    Environment variable appears to have no effect.