I am building a VR application with a menu scene and many other scenes.. I would like to get back into the menu scene from any other scene when the user hits the mobiles back button (android).. What is the script for that and where should i place the script??
You use the Escape
keycode to detect back button press on Android.
using UnityEngine.SceneManagement;
void Update()
{
if (Input.GetKey(KeyCode.Escape))
{
SceneManager.LoadScene("Main Menu");
}
}