OVRManager.HMDUnmounted event seems to not work correctly
Hi,
I use OVRManager.HMDUnmounted to detect that the player removes the GEAR, to stop reading the video and bring up a menu.
From the moment that the scene was load 2 times the event is correctly received, and the video stops as desired, but all SetActive commande are not taken into account ...
Is there another method to detect the player removes the Gear VR ?
Here my code
// Seems to be ok nly after the seond load of the scene
Thank you
Nicolas
I use OVRManager.HMDUnmounted to detect that the player removes the GEAR, to stop reading the video and bring up a menu.
But the operation remains strange, I have two scenes the main menu and the player. When the scene "player" is loaded for the first time the detection is never performed, I need to go back to main menu and reload the player scene.
From the moment that the scene was load 2 times the event is correctly received, and the video stops as desired, but all SetActive commande are not taken into account ...
Is there another method to detect the player removes the Gear VR ?
Here my code
void OnEnable(){
OVRManager.HMDUnmounted += OVRManager_HMDUnmounted;
}
void OnDisable(){
OVRManager.HMDUnmounted -= OVRManager_HMDUnmounted;
}
// Seems to be ok nly after the seond load of the scene
void OVRManager_HMDUnmounted (){
mediaCtrl.Pause(); // OK after the second load
VRCameraUI.SetActive( true); // Not take into account
reticule.SetActive( true); // Not take into account
playerMenu.SetActive( true); // Not take into account
}
Thank you
Nicolas
