/// <summary>Restore the current project.</summary> /// <returns>True if the restore was successful.</returns> public static bool Restore() { isBusy = true; OnRestoreStart?.Invoke(); bool success = false; if (Util.Config.COPY_ASSETS || Util.Config.COPY_LIBRARY || Util.Config.COPY_SETTINGS || Util.Config.COPY_PACKAGES) { success = Util.Config.USE_LEGACY ? Util.Helper.Restore() : Util.Helper.RestoreNew(); } else { Debug.LogError("No folders selected - restore not possible!"); #if UNITY_2018_2_OR_NEWER if (Application.isBatchMode) #else if (UnityEditorInternal.InternalEditorUtility.inBatchMode) #endif { throw new System.Exception("No folders selected - restore not possible!"); } //EditorApplication.Exit(0); } OnRestoreComplete?.Invoke(success); isBusy = true; return(success); }
/// <summary>Default method after restore.</summary> public static void DefaultMethodAfterRestore() { //Debug.LogWarning("'DefaultMethodAfterRestore' was called"); OnRestoreComplete?.Invoke(true); }