My UI Buttons work in editor, but not when I export to android (using Cardboard VR)?,My buttons working on editor, but not on android (Gooogle Cardboard VR)
I'm currently working on a VR Game for android, and though I have tried for days to find the solution for this issue, I still can't figure it out. Therefore, I am here to ask you for help in this matter.
My UI buttons seem to work perfectly in the Editor, but once I export it, they simply refuse to be clicked (doesn't even highlight). I have absolutley no clue as to what may be causing this, any help would be appericiated.
My Code:
public void PlayGame()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
}
public void ExitGame()
{
Application.Quit();
Debug.Log("Game Terminated");
}
}
Thank you.,I'm working on a VR game, and I'm using google cardboard for it, I've got one problem though. My UI buttons work in the editor, but not when I export the project to my phone.
My code:
public void PlayGame()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex +
1);
}
public void ExitGame()
{
Application.Quit();
Debug.Log("Game Terminated");
}
My question to you, faithfull helpers on the unity questions, what may be causing this, and what solutions are available? I'm sincerely gratefull for any help I can get, thank you.
Answer by kirbycano98 · Aug 27, 2020 at 06:54 PM
Have you tried using the XR Ray Interactor? (using xr interaction plug-in).
I was having the same issue (but in Oculus quest), I gave up using the UIHelper prefab, so I tried using the XR Ray Interactor prefab, worked perfectly with very easy setup.
Your answer
Follow this Question
Related Questions
Possible for 10 canvas in 1 scene? 1 Answer
App Runs fine after "Build and Run" but freezes when installed from APK 0 Answers
How to edit Cardboard VR default UI 0 Answers
Buttons not working on click for VR game 0 Answers
Unity terrain crashing GVR 0 Answers