Forum Discussion
Elecman
11 years agoExplorer
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:
and adding this to the end of Awake():
But that only works in the Editor but in the standalone version the head tracking stops working and the warning is not removed.
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
- YbalridExpert ProtegeWhy would you want to remove the safety warning ? It only appears for a few seconds so it's not anoying.
- ElecmanExplorerNot all of us live in the US where you have to worry about getting sued. And yes, I think it is annoying.
- cyberealityGrand ChampionPlease don't attempt to disable the warning. It's there for a reason.
- drashHeroic Explorer
"cybereality" wrote:
Please don't attempt to disable the warning. It's there for a reason.
I think it's fine to have it there, as now I don't need to include it in my apps myself. However, I think it would help everyone if it was more clear on how to dismiss it, and if it did not interfere with programs to the degree that it does.
It specifically says to press any key to continue, but that's not always the case. What is the exact condition for dismissing it? In Unity Tuscany, I can dismiss it by starting to walk forward, but I can't dismiss it by hitting space (which brings up the OVRMainMenu). In programs like Elecman's, I can't figure out how to dismiss it except to wait for what seems like a long time, and during that time when I can't see too well, my plane is on a trajectory to crash on the runway.
I think that in the end, the safety warning should show up by itself before the program starts, rather than be overlaid on whatever program is running, and it should be clear in how to dismiss it & proceed (and be able to actually continue with any keypress). Small touches could make this warning more seamless and user-friendly, which would then go a long way toward achieving its intended purpose. - 2EyeGuyAdventurertap the side of your rift!
- PathogenDavidHonored Guest
"drash" wrote:
It specifically says to press any key to continue, but that's not always the case. What is the exact condition for dismissing it?
Right now, the SDK requires you to call ovrHmd_DismissHSWDisplay to dismiss the display. This function will only actually dismiss the display if the required time has elapsed. If the function is called before the required time has elapsed, it will queue a dismissal to occur as soon as the required time has elapsed. The required time is 4 seconds is the user's Oculus profile has never been seen before, otherwise it is 2 seconds. In debug builds, the required time is always 2 seconds in debug builds regardless. (For some reason, this is done in HSWDisplay::TickState in a strange manner rather than just doing it in HSWDisplay::Display)
Anything beyond what is described above must be handled by your application. So it is up to devs to properly implement calling ovrHmd_DismissHSWDisplay on any key press."drash" wrote:
I think that in the end, the safety warning should show up by itself before the program starts, rather than be overlaid on whatever program is running, and it should be clear in how to dismiss it & proceed (and be able to actually continue with any keypress). Small touches could make this warning more seamless and user-friendly, which would then go a long way toward achieving its intended purpose.
Yup, it is definitely pretty rough around the edges, but I'm sure they plan to polish it more. For instance, I'd like to see the "Press any key to acknowledge" part only appear after the required time has passed. (Like the Wii's safety warning.)"cybereality" wrote:
Please don't attempt to disable the warning. It's there for a reason.
I'm not sure about the legal stuff involved here, but is the warning protecting Oculus or the developers? It'd be nice if we could replace it with our own warning without hacking at the SDK. For instance, in my project I would rather show the warning in an all-black room with it rubber-banding to the user's view, and if I'd rather the message automatically change to "Press A to acknowledge" if the player is an Xbox controller. (I know ovrhmd_EnableHSWDisplaySDKRender implies you guys are planning to allow this scenario, but I thought I should make my concerns known in case it might get axed.)"Elecman" wrote:
What is the proper way to get rid of the health and safety warning in Unity?
As I stated above, you can't dismiss it before the timeout happens. I don't know if it is exposed in the Unity plugin, but there is a function called "ovrhmd_EnableHSWDisplaySDKRender" labeled as experimental. It looks like it is meant for people wanting to render their own warning, but I guess if you never render your own warning then it is effectively an off switch.
However, like cybereality said, the warning is there for a reason. I'd recommend to turn it back on for builds of your project that you distribute to people. - guygodinProtegeIt is quite annoying at the moment. If you pause your game loop for a while and then resume it, the notice will re-appear. For example in virtual desktop, you get it when you start the app, then launch a game (you get it in that game too). Exit the game and you get it again in virtual desktop when it resumes.
I know it's important that you get the warning to people but currently it is annoying. - PathogenDavidHonored GuestHmm, that is strange that you see it re-appearing because I don't see logic that does this. It does look like they intend to add a feature to re-show it if the HMD is disconnected and reconnected, but it is hard-coded to "HMD is always connected" right now with a todo comment.
Are you tearing down and recreating the HMD references? Because that's the only scenario where I see that happening. (You can look at the logic for the initial call to HSWDisplay::Display around line 279 of CAPI_HSWDisplay.cpp)
You might've needed to do this to avoid conflicting with launched apps in the past, but I think the new SDK and the Oculus background service resolve this.
Not completely related, but I found these comments interesting: (Line breaks added for readability.)// We need to display if any of the following are true:
// - The application is just started in Event Mode while the HMD is mounted
// (warning display would be viewable)
// and this app was not spawned from a launcher.
// - The current user has never seen the display yet while the HMD is mounted
// (warning display would be viewable).
// - The HMD is newly mounted (or the warning display is otherwise newly viewable).
// - The warning display hasn't shown in 24 hours (need to verify this as a requirement).
// Event Mode refers to when the app is being run in a public demo event such as a trade show.
Although, only the 2nd and 3rd bullet points are implemented. And the third isn't completely done yet, its current behavior is more like "The warning has not been shown yet during the lifetime of this HSWDisplay object." - guygodinProtegeYea I am destroying the HMD and re-creating it. The reason I have to do this is to correctly handle desktop configuration changes (change of resolution, refresh rate, etc.). If a user disables one of his monitor for example, the device name stored in the HMD is not longer valid. I shouldn't need to with 0.4.0 in theory but since Direct Mode isn't working, I don't have any other choices.
- PathogenDavidHonored GuestAh, that's definitely why then. Your only choices that I see then are to modify the SDK or employ the use of ovrhmd_EnableHSWDisplaySDKRender to force the SDK to not render the warning.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago