[MenuItem("VR Build Settings/Switch to Gear VR Build")] static void BuildGearVRSettings() { PlayerSettings.virtualRealitySupported = true; GvrViewer Viewer = GameObject.Find("GvrViewerMain").GetComponent(); GvrHead Head = GameObject.Find("Main Camera").GetComponent(); Viewer.VRModeEnabled = false; Head.trackPosition = false; Head.trackRotation = false; EditorWindow window = new BuildPopup("Switch to GearVR Build", "Le changement a bien été effectué"); window.ShowUtility(); } [MenuItem("VR Build Settings/Switch to Google VR Build")] static void BuildGoogleVRSettings() { PlayerSettings.virtualRealitySupported = false; GvrViewer Viewer = GameObject.Find("GvrViewerMain").GetComponent(); GvrHead Head = GameObject.Find("Main Camera").GetComponent(); Viewer.VRModeEnabled = true; Head.trackPosition = true; Head.trackRotation = true; EditorWindow window = new BuildPopup("Switch to Google Build", "Le changement a bien été effectué"); window.ShowUtility(); }