Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
phileday's avatar
phileday
MHCP Member
11 years ago

health warning

I use if(OVRManager.isHSWDisplayed == false){ to detect whether the health warning is still active but for some reason it doesn't always return false and you find yourself pressing any key and the health and safety doesn't disappear and the game starts.

Anyone else have anything similar?

3 Replies

Replies have been turned off for this discussion
  • If the health and safety warning refuses to disappear, then please delete your Config Util profile and create a new one. I thought this was supposed to be fixed, but if you have an old profile it may be corrupted.
  • Thanks for your reply and sorry for the slow response. I'll try that and let you know if it work. Thanks
  • I have continued to come across this issue and believe that I know what's happening now. When the program runs the first thing in my script it tests the to see if the health and safety has gone before opening the menus etc. What seems to be happening is that the health and safety actually starts off testing as false before then appearing and testing true and then going testing as false again. My program reads this sometimes manages to read the value quick enough to test as false before it comes up. I fixed this, although I don't know why this seems to fix it, by reading the value and putting it into 3d text object before it gets to my test.

    if(OVRManager.isHSWDisplayed == true){fredfred.GetComponent(TextMesh).text = "true";}
    if(OVRManager.isHSWDisplayed == false){fredfred.GetComponent(TextMesh).text = "false";}

    This seems to give the hswdisplayed enough time to get running before I test it again properly.

    Thought I'd post in case other people were having this problem.