Pushing on GUI button not working the second time the same scene is loaded (after a Google Cardboard scene)

I have a scene with only a main_menu:

55410-hlatj.png

When the scene is loaded the first time, I can click on the buttons with no problems. I click on Play to load another scene. Then, I click on main_menu to load that scene again. Now here comes the weird thing:

  • If I tap on the buttons in my Android smartphone, they don’t work.
  • If I tap I quickly tap on another part of the screen to tap on a button right next, the button works!
  • If I use Unity Remote (instead compiling it to Android), the buttons work too.
  • I have realize it only happens if the previous scene is has the Google Cardboard camera, event system, etc.

I have try both setting the canvas as Screen Space - Camera, Overlay, and World Space. Buttons have interactable activated. I have activated Force Module Active at the EventSystem modules.

It seems a bug… How could I find out how to solve it? It only fails when I compile it for Android, so how to debug it?

On the other hand, I would add Google Cardboard as a topic of this site.

Updating the Google Cardboard to Version 0.5.1 have solved the problem.

If you don’t want to update, I think executing the following code before switching to the non virtual reality scene could work (not tested): Cardboard.SDK.VRModeEnabled = false;

Updating is easy if you pay attention of the following (based on my experience):

  • Remove the Cardboard folder completely
  • The old asset of Google Cardboard had stuff for the Plugins folder. You have to remove that stuff.
  • Import the new Google Cardboard Asset through Asset - Import package - Custom package
  • You will see some errors. Just restart Unity.