- Home /
How to load a scene with GameFlow on button click ? ( XR RIG / Oculus Quest )
Hi guys is anyone kind enough to help me?
I am developing a menu for a VR app for Oculus Quest (jogging simulation) and I state that as far as my C # programming skills are concerned, I am really in the early stages. I created a scene called menu (I enclose screenshots) and I correctly set the XR RIG to interact with the menu items (buttons you see on the screen).
The panel shows a text message on the screen and after about two seconds I programmed the playback of an mp3 (female voice) that reads the text message on the screen.
I have programmed GameFlow to play a sound when every single button is clicked and load the corresponding scene. The exit button has been programmed (again with GameFlow) to exit the game.
The problem is that when I compile the app and try it on the Oculus while the button with the word exit does not give problems (pointing it with the oculus controllers and clicking on it you exit the game without problems), clicking on the other buttons (which have the function to load the three levels of the game) the background music and the announcement in mp3 format continues to be played, the selected level appears for a few frames and then the menu reappears (with the audio of both levels playing simultaneously), a big mess.
I tried to load the scene both normally and asynchronously, the result is the same. For safety I have implemented the function of loading the single scenes through a script (which I enclose in the attachment) and associating it to each button but the result is the same (even worse). I also tried to lighten the scene related to the menu (before there were buildings, animated characters, etc.) but the result is the same.
What am I doing wrong? Anyone can give me some useful suggestions?
Thanks in advance for your answers
Mauro