// // use this for processing any key inputs // public async void HandleKeyInput(InputAction.CallbackContext context) { InputAction action = context.action; switch (action.name) { case "StartEdit": appState.StartEditSession(); break; case "StopSaveEdit": appState.StopSaveEditSession(); break; case "StopDiscardEdit": appState.StopDiscardEditSession(); break; case "Exit": Debug.Log("FlyingCam.Exit save before quit"); MapInitialize mi = appState.map.GetComponentInChildren <MapInitialize>(); await mi.Save(); Debug.Log("FlyingCam.Exit now quit"); Application.Quit(); break; } }
public async void OnClick() { Debug.Log("QuitButton.OnClick save before quit"); MapInitialize mi = AppState.instance.map.GetComponent <MapInitialize>(); await mi.Save(false); Debug.Log("QuitButton.OnClick now quit"); Application.Quit(); }