Forum Discussion
phileday
10 years agoMember
5.1.2p2 and commands health safety etc
So I've now got the new version of Unity all up and running in my app but I'm missing a couple of functions which I used from the previous Oculus setup these are:
OVRManager.isHSWDisplayed (so I could check that the health and safety message had gone before allowing interaction)
OVRManager.tracker.isEnabled (To allow people to switch of headtracking if they want)
I also previously had an option for changing the FOV which is no longer available. This is something I added on request but I'm not a big fan of changing this as it looks a bit weird. So less required at the moment.
Are these options supported yet? If they are or if there is a place listing the latest functions available where abouts are these?
Another thing I noticed as well was that the UnityEngine.VR.VRDevice.isPresent function detects whether the VR device is on but only at the start so if, for instance you turn the Oculus off it will still read true. Not a massive problem but I thought it was worth mentioning in case it was unknown
OVRManager.isHSWDisplayed (so I could check that the health and safety message had gone before allowing interaction)
OVRManager.tracker.isEnabled (To allow people to switch of headtracking if they want)
I also previously had an option for changing the FOV which is no longer available. This is something I added on request but I'm not a big fan of changing this as it looks a bit weird. So less required at the moment.
Are these options supported yet? If they are or if there is a place listing the latest functions available where abouts are these?
Another thing I noticed as well was that the UnityEngine.VR.VRDevice.isPresent function detects whether the VR device is on but only at the start so if, for instance you turn the Oculus off it will still read true. Not a massive problem but I thought it was worth mentioning in case it was unknown
14 Replies
Replies have been turned off for this discussion
- gowgowHonored GuestI'm also wondering how to detect whether the safety warning is being displayed in Unity 5. I'd like to make it so my program doesn't proceed until the user has got the warning screen to disappear. Can anyone help?
- gowgowHonored GuestNo help for this? I want to display a welcome screen that explains the controls and lets the user choose the graphics setting. To start the game the user presses the "A" button (or return key) on the xbox controller. The problem is that the user can also (I believe) use this button to dismiss the warning screen, but this only works until a certain amount of time has passed. So what happens is that the user will just repeatedly start hitting the button hoping to get the warning screen, and then will blow right past my welcome screen.
Edit: I tried importing the Oculus Unity utility package and then I do have this available:
OVRManager.isHSWDisplayed
But it doesn't work. It returns false even when the HSW screen is definitely showing. - cyberealityGrand ChampionThis is a good question. Let me try to find out on Monday.
- sh0v0rProtege
"gowgow" wrote:
Edit: I tried importing the Oculus Unity utility package and then I do have this available:
OVRManager.isHSWDisplayed
But it doesn't work. It returns false even when the HSW screen is definitely showing.
I can confirm this doesn't work also. I like to check if the HSW is being displayed to stage the boot up progression sequence to prevent it from appearing ontop of the game. - philedayMemberWas there any conclusion on this? With the new runtime out I can imagine that there will new versions of Unity3D coming soon as well. Will this option be included in the next version or is there a way to do it in the current version already?
- vrdavebOculus StaffAny XBox controller button or keyboard key should now work to dismiss the HSW in 0.7. Is it still broken for you? Our service actually listens for the key and button presses, so there is no need to call dismissHSW in a script.
- vrdavebOculus StaffThe isHSWDisplayed field is indeed broken in Unity 5.1.1 and up. We have fixed it for a near-future Unity release.
- philedayMemberIs there going to be a unity Native version of this command? I currently have no Oculus stuff in my scene and I'm using all the Unity Native commands. It seems a bit cumbersome to install the Oculus integration just for one command.
- vrdavebOculus StaffWe aren't planning to expose this directly through Unity, but it's pretty simple to do without using any other Oculus classes or prefabs. You could take a look at how it's implemented in the Oculus Utilities package and create a minimal alternative of your own.
- philedayMemberI've created a very basic scene with a test for the health and safety warning using using "OVRManager.isHSWDisplayed".
The scene is just a camera, plane, text attached to plane and a short javascript that tests the "OVRManager.isHSWDisplayed" for true or false sends that to the text. There is also a debug.log showing the value of "OVRManager.isHSWDisplayed".
The "OVRManager.isHSWDisplayed" always displays false. I'm I doing something wrong? I've attached a link to the simole project below.
https://www.dropbox.com/s/46omrocnwgb5a ... t.zip?dl=0
Other people have reported that the health and safety test wasn't working but I thought it might of been fixed in this build.
You also say you aren't going to expose the health and safety test directly through Unity. Is the Health and Safety test only related to Oculus then? I assumed that any VR device that uses the Native VR would have this message.
I also looked at the implementation of the Oculus test and couldn't work it out. Could you give an example of simple script that would test for this without the need for the Oculus Util being installed? Or if there is anyone else out there that has managed to get this working and could help that would be great.
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
- 3 months ago