IEnumerator AutosaveCheck() { yield return(null); if (System.IO.File.Exists(autosaveLocation)) { #if !UNITY_EDITOR string autosaveText = "An autosave was detected indicating that the program did not correctly shut down during the last session. \nWould you like to reload the autosave?"; string autosaveCaption = "Warning"; NativeMessageBox.Result result = NativeMessageBox.Show(autosaveText, autosaveCaption, NativeMessageBox.Type.YesNo, editor.windowHandleManager.nativeWindow); if (result == NativeMessageBox.Result.Yes) { yield return(StartCoroutine(editor._Load(autosaveLocation, false))); ChartEditor.isDirty = true; } #endif } }