public void LaunchVrHome() { #if UNITY_ANDROID && !UNITY_EDITOR GvrDaydreamApi.LaunchVrHomeAsync((success) => { if (!success) { // Unexpected. See GvrDaydreamApi log messages for details. Debug.LogError("GvrDaydreamApi.LaunchVrHomeAsync() failed"); } }); #endif // UNITY_ANDROID && !UNITY_EDITOR }
public void quitApp(ControlInput controller, ControlInput.ControllerDescription controllerObject, GameObject button, GameObject avatar, bool initialize = false) { if (!initialize) { switch (SelectController.getActivePlatform()) { case SelectController.DeviceOptions.Daydream: GvrDaydreamApi.LaunchVrHomeAsync(null); break; default: Application.Quit(); #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #endif break; } } }