Using google cardboard gaze input to select from multiple new scenes (Level selector)

Hello everyone!

I have a simple task; I’ve built a main menu “scene” in VR. The camera floats around the scene. Around the scene are level “orbs”. When the player gazes at them and clicks the mouse button, I want to change to that scene. There are three scenes called;

D1
D2
J1

I know it’s probably really simple. I already have everything setup and it works properly, however my changelevel script isn’t working properly. Initially, it was really buggy, (it would change scene, when new scene was finished it would return to main scene. If I tried to play scene again, it wouldn’t work). Furthermore, I can’t get the script to select from different scenes; if I try to create more than one scene script, and place it on the orbs, it crashes.

Could someone pretty pretty please write me a quick & simple c# script which loads between these three levels on the mouse click variable? It could either be three separate scripts, or just one script with a variable I can set in unity, (maybe drag and drop level to be selected in heirarchy menu?) If I had a properly formatted & written c# script, I would understand how it’s properly done in unity.

The reason I ask, is because there isn’t anything specific about MULTI LEVEL without using a gui. The other gaze changers only change to ONE new scene. When I tried to edit code to select between different scenes, it didn’t work.

Thanks!

Also, I notice some people just respond by linking to the generic unity tutorial, or just giving a line of code to change the level. I’m still new, and would like the full script so I can fully understand the process of doing this in unity.

Hello sir,
i want to change the scene when google gaze trigger on a button or cube.when i call OnTriggerStart() then it works but when i call onTriggerEnter() and write code to load level or scene then it doesn’t respond. Can you please tell what i am doing wrong!