How to change Scenes in VR games


I am developing a VR Game for HTC Vive using SteamVR Plugin.
In the Main Menu I have a button. If I click it with the trigger, it should load a new scene.


What happens:

  • In the Editor, it works properly every time
  • If I publish it, it works properly 4 or 5 times, after that, the game crashes when I press the button.

I tried several things:

  • I checked the Event Viewer. It Says that: “Application hang” and asked to check Security and maintenance. Nothing else.
  • I tried restarting the game/rebuilding it, it keeps crashing.
  • I need to restart my PC and rebuild the game in order for it to work again.
  • I tried several methods to change the scene: Application.LoadLever, SceneManager.LoadScene and SteamVR_LoadLevel. I also tried the async versions. I got the same result.

How can I fix/troubleshoot this?
In the editor, it works perfectly.

Thanks

Ok, so I updated the SteamVR Plugin and the error stopped occurring randomly. I can still reproduce it if I press the Trigger rapidly and several times, but at least now if I restart the app it works properly.

Also, now, the error does not appear in the Event Viewer.

Weird, the version I was working with was from December 2017, and I updated it with the one from Jan 10, 2018.