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
    July 28, 2014
    I would at least like to see the warning only show for the first application launch after a period of inactivity. As it is you even see it when launching one VR app from another (like the virtual desktop), which is quite a nag. It should just be once per session.
    Up and Coming
    July 28, 2014
    "PathogenDavid" wrote:
    I've mentioned a few things in this thread, but if you're using the SDK directly: You should be able to disable it by just calling ovrhmd_EnableHSWDisplaySDKRender(hmd, false) (No modification to the SDK necessary, you will need to include CAPI_HSWDisplay.h though.)

    If you're using Unity or Unreal Engine, you'll have to do something else. I don't have any experience with LibOVR on either so I couldn't tell you what you need to do.

    Thanks! :)

    "owenwp" wrote:
    I would at least like to see the warning only show for the first application launch after a period of inactivity. As it is you even see it when launching one VR app from another (like the virtual desktop), which is quite a nag. It should just be once per session.

    That may be a valid course of action if you'd have a finished product to ship, not if you are re-compiling your application multiple times every hour. It pretty much defeats the purpose of a devkit if there is a warning every time you'd want to to look at changes.
    Even in a finished product I doubt people won't get annoyed enough to look for a way to disable it. I honestly can't see a reason why it's need in this fashion anyway. Now there is the possibility to have an extra window on the users screen to display this warning (no need for it to be in the game). You can display a launcher which stays on the regular screen and the warning along with more information and settings where it would be way more helpful.
    Participant
    July 29, 2014
    A virtual world with infinite freedom... infinite reality... beyond life.... beyond death.....
    But first, a compulsory word from your friendly neighbourhood heath and safety officer....
    Up and Coming
    July 29, 2014
    "alexfry" wrote:
    A virtual world with infinite freedom... infinite reality... beyond life.... beyond death.....
    But first, a compulsory word from your friendly neighbourhood heath and safety officer....

    We live about a century too early to experience that. But ultimately if individuality remains boundaries will remain exactly where they are, they will just be thinner.
    Up and Coming
    July 29, 2014
    "cybereality" wrote:
    Please don't attempt to disable the warning. It's there for a reason.


    Given how poorly implemented it is (as evinced here by multiple people stating the same thing) that is hardly an acceptable answer.

    "nukemarine" wrote:
    Can they at least have it not stuck to the face? I find it odd that this warning message does not follow the best practices guide of "stuck in space, not on your face".

    They should also include a way to disable it in the configuration settings (up to the end user and not the developer). I have no problem clicking the "I understand the health and safety concerns with this unit". Having it appear all the time is as useless as not showing it at all. Plus, it's more aggravating.


    Yeah this, it should be able to be disabled because it's not even implemented properly - at least give us the tools to implement a warning that's not half-assed and follows best practices.

    Edit: Looks like there is the experimental function. I'm going to probably see about committing a pull request to get that exposed to the Unreal Engine, because this will be a MASSIVE irritation. No way in hell I'm watching that damn thing pop up every time I start/stop my game for testing.
    Twitter IndieDB
    Up and Coming
    July 30, 2014
    I can bring an extra thing here - not sure if it was mentioned above sorry if it is.
    Thing won't go away by pressing mostly any key.... just doesn't.
    Coincidentally it loves responding to the keys that happen to be controls in my game.... so dismissing the warning results in undesired input in the game menu. Not the best warning screen I've seen in my time, but I can live with it if we know it's going to be improved.
    Participant
    July 30, 2014
    budwheizzah,

    Programs are responsible for notifying the SDK that the user has pressed a key with the ovrHmd_DismissHSWDisplay function, I talked about this earlier in the thread.
    Up and Coming
    July 30, 2014
    "PathogenDavid" wrote:
    I've mentioned a few things in this thread, but if you're using the SDK directly: You should be able to disable it by just calling ovrhmd_EnableHSWDisplaySDKRender(hmd, false) (No modification to the SDK necessary, you will need to include CAPI_HSWDisplay.h though.)

    Thanks David, didn't see that one. I'm now using this to ensure the warning gets displayed only once for the lifetime of my application. I think Oculus could keep a flag internally that knows whether or not the warning has been displayed at least once...
    Virtual Desktop Developer
    Participant
    July 30, 2014
    Glad that fixed it for you! Yeah, there is a flag, but its not very robust so you're unintentionally resetting it. :lol:
    Inspiring
    July 30, 2014
    There has to be a better way to deal with this legal bullshit.