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

    Up and Coming
    August 22, 2014
    Live for Speed Test Patch 0.6F8 is available, now with the health and safety warning implemented the best way I could think of. it complies with the requirements, I believe, but tries not to get in the way too much, whichever way you start LFS (which is different depending on your license status, whether you have selected to load track at startup, if you are using command line options to go immediately into an online game or whatever). Hope it works in all cases!

    [There's also an option "Store driving position" to avoid setting your driving position every time you start up.]
    Test Patch on LFS forum: https://www.lfsforum.net/showthread.php?t=86202

    Here is the LFS thread on the Oculus forum:
    viewtopic.php?f=42&t=5335&p=175178#p175178
    Live for Speed - www.lfs.net
    Up and Coming
    August 22, 2014
    "cybereality" wrote:
    While there is some brief coverage of the health and safety warning in the integration doc, I will speak with the team about improving and elaborating on this process. Thanks.


    It is important that the Oculus team is made aware that developers need to have a way to disable the warning without having to recompile the SDK for your engine integrations. Ideally this would ship with 0.4.2. We would all be extremely thankful if you could run this up the chain wherever it needs to go. Eventually, we'll all have to deal with the HSW atrocity in shipping products when that time comes (likely by some friendly hackers developing an HSW-disabling patcher), but meanwhile it would be of huge benefit to make development iteration as seamless as possible by giving us an easy way to disable the warning completely.
    Inspiring
    August 22, 2014
    "LaeusVR" wrote:
    It is important that the Oculus team is made aware that developers need to have a way to disable the warning without having to recompile the SDK for your engine integrations.


    This is in the SDK, just not listed in the header. You can access it by declaring the following in your code:

    extern "C" {
    void ovrhmd_EnableHSWDisplaySDKRender(ovrHmd hmd, ovrBool enabled);
    }

    Calling it with 'false' after you've configured rendering will disable the HSW display. However, doing so in such a way that intentionally violates the license is obviously not recommended. However if you're working with an application that allows a user to toggle in and out of VR mode in such a way that the warning keeps getting triggered, it's probably a reasonable use case to use this to disable it after the first time the VR mode has been run and the user has acknowledged the warning.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    August 23, 2014
    "jherico" wrote:
    "LaeusVR" wrote:
    It is important that the Oculus team is made aware that developers need to have a way to disable the warning without having to recompile the SDK for your engine integrations.


    This is in the SDK, just not listed in the header. You can access it by declaring the following in your code:

    extern "C" {
    void ovrhmd_EnableHSWDisplaySDKRender(ovrHmd hmd, ovrBool enabled);
    }


    That's only if you're building against the SDK yourself though, right? I'm talking about being able to disable it without recompiling the library for the Unity and Unreal engine integrations. Though, maybe I'm just doing something wrong. In the Unity integration, in OVRHmd.cs, I tried adding the following near the other imports:


    [DllImport(LibFile)]
    private static extern void ovrhmd_EnableHSWDisplaySDKRender(IntPtr hmd, bool enabled);


    However, when I tried calling into it, I got an unresolved extern error.
    New Participant
    August 30, 2014
    lo lat people saying its not annoying and its there for a reason... Yes in america maybe you need to tell people to not do stupid stuff because the law system is bonkers there... But I don't know a single other country were people can sue someone because they do really stupid stuff... Please turn it off forever, it's super annoying. Thanks.
    Participant
    August 30, 2014
    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.
    Up and Coming
    August 30, 2014
    "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.


    *Facepalm*.
    Twitter IndieDB
    Up and Coming
    September 1, 2014
    Now that I'm demoing my project to others, the way the HSW violates Oculus' own best practices is actually making some of my playtesters woozy (it's rendered at a depth that is farther than other stuff in my environment, not to mention this huge thing being attached to your face, or how it violates UX conventions by not actually going away when they press any key until the hidden timer expires).

    The only thing it's good for is making lawyers happy, while it eats away at the productivity of VR developers and, eventually, adoption by potential VR customers.

    It needs to go. The lawyers need to find some other way of protecting people from themselves, a way that doesn't do damage to this fragile ecosystem we're trying to build here.
    Up and Coming
    September 2, 2014
    I have seen this #*&%$§@$ warning now hundreds of times already. Dozens of times every single day. Each time I have to wait several seconds to see my content, even for quick checks. That thing is driving me NUTS!

    @Oculus: Provide a checkbox in the runtime, name it 'Developer mode', display a large legal agreement screen if you feel to do so and then stop keeping us away from developing and playtesting.

    The current situation is just ridiculous.

    spyro
    Inspiring
    September 2, 2014
    "spyro" wrote:
    I have seen this #*&%$§@$ warning now hundreds of times already. Dozens of times every single day. Each time I have to wait several seconds to see my content, even for quick checks. That thing is driving me NUTS!


    Disable it in your dev builds.


    // Somewhere in your code declare this function
    extern "C" {
    void ovrhmd_EnableHSWDisplaySDKRender(ovrHmd hmd, ovrBool enabled);
    }

    ...

    // During initialization
    ovrHmd_ConfigureRendering(...);
    #ifdef DEBUG
    ovrhmd_EnableHSWDisplaySDKRender(hmd, false);
    #endif
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action