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

    Participant
    September 2, 2014
    "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.

    Obviously it should not be. If anything a quick calibration/transition screen should be shown. (transition being something that brings you into the environment, rather than drop you in it)
    Up and Coming
    September 2, 2014
    So... back to the original question. When is the first time (in your code) that you can dismiss the thing?
    I tried calling ovrHmd_DismissHSWDisplay(m_Hmd) right after the creation of m_Hmd but that doesn't seem to work (it stays forever). Then I tried right after ovrHmd_ConfigureRendering(...) which seems to work. But is sooner possible?
    Inspiring
    September 2, 2014
    "DoZo1971" wrote:
    So... back to the original question. When is the first time (in your code) that you can dismiss the thing?
    I tried calling ovrHmd_DismissHSWDisplay(m_Hmd) right after the creation of m_Hmd but that doesn't seem to work (it stays forever). Then I tried right after ovrHmd_ConfigureRendering(...) which seems to work. But is sooner possible?


    ovrHmd_DismissHSWDisplay is only intended for dismissing a currently visible HSW, so I wouldn't expect it to work until after you've called ovrHmd_GetHSWDisplayState and detected that it's being displayed. That it works simply by calling it directly after ovrHmd_ConfigureRendering is probably just an accidental implementation detail. If you're trying to disable it for debug builds, you should be using the function I mentioned above, not this, as it will never eliminate the display.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Inspiring
    September 2, 2014
    "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.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    September 2, 2014
    Funny that they put it on the debug hmd as well :)

    "jherico" wrote:
    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.


    Can we also disable this via JOVR somehow? I dont see the method exposed...
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    Inspiring
    September 2, 2014
    "whitehexagon" wrote:
    Funny that they put it on the debug hmd as well :)

    "jherico" wrote:
    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.


    Can we also disable this via JOVR somehow? I dont see the method exposed...


    It's not yet exposed. I may be able to get a new build out this week to address it.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    New Participant
    September 3, 2014
    "nuB" wrote:
    If anything a quick calibration/transition screen should be shown. (transition being something that brings you into the environment, rather than drop you in it)


    "egardner71" wrote:
    The best reason to leave it is that it gives the user a moment to adjust the headset for the best view before they begin the experience.
    Think of it as a quick calibration screen.


    I kind of like this idea - the HSW could be transformed into a combined HSW/calibration screen, couldn't it? I can imagine a nice scene serving both the purposes at the same time.

    And I agree that the current HSW is not good at all.
    Up and Coming
    September 3, 2014
    ovrHmd_DismissHSWDisplay is only intended for dismissing a currently visible HSW, so I wouldn't expect it to work until after you've called ovrHmd_GetHSWDisplayState and detected that it's being displayed. That it works simply by calling it directly after ovrHmd_ConfigureRendering is probably just an accidental implementation detail. If you're trying to disable it for debug builds, you should be using the function I mentioned above, not this, as it will never eliminate the display.


    Maybe in the next version they will remove the "ovrhmd_EnableHSWDisplaySDKRender(...)" function altogether, so this would just be a temporary hack.

    Anyway. I don't want to remove it, I want to have the message visible as short as possible. In my particular application/presentation there is no keyboard present (nor any other input device) so I just want it to disappear quickly and hope they will remove (or postpone) the "press any key" line which, in my case, will create confusion. I could make my own timer of course (-blech-) or check every frame (-blech-) or just turn it off "somewhere" during initialization.

    PS. Worst thing is the aesthetics of the whole thing. Imagine going to the theatre. Big HSW before the show. There might be cursing during the play. There might be nudity. Your chair might collapse. Before your brain is back in "suspension of disbelief" mode, you're 5 minutes into the show.
    kojack
    Honored Contributor
    September 3, 2014
    "DoZo1971" wrote:
    In my particular application/presentation there is no keyboard present (nor any other input device) so I just want it to disappear quickly and hope they will remove (or postpone) the "press any key" line which, in my case, will create confusion. I could make my own timer of course (-blech-) or check every frame (-blech-) or just turn it off "somewhere" during initialization.

    You could do it like some of the unreal demos do: detect sharp horizontal jolts on the accelerometer as a headset tap, that's how they remove the warning.

    I wonder if the Samsung Gear VR (running on the "Oculus Mobile SDK") has a warning screen?
    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
    Inspiring
    September 3, 2014
    "jherico" wrote:
    "whitehexagon" wrote:
    Can we also disable this via JOVR somehow? I dont see the method exposed...


    It's not yet exposed. I may be able to get a new build out this week to address it.


    OK, I've updated the JOVR library to 0.4.1.2 and there should be an enableHswDisplay method exposed in both the OvrLibrary and the Hmd helper class.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action