private static void SaveInstance(MaintainerPersonalSettings settingsInstance) { if (!System.IO.Directory.Exists(Directory)) { System.IO.Directory.CreateDirectory(Directory); } try { UnityEditorInternal.InternalEditorUtility.SaveToSerializedFileAndForget(new[] { settingsInstance }, Path, true); } catch (Exception ex) { Debug.LogError(Maintainer.ConstructError("Can't save personal settings!\n" + ex)); } }
/// <summary> /// Call to save any changes in any settings. /// </summary> public static void Save() { SaveInstance(Instance); MaintainerPersonalSettings.Save(); }
/// <summary> /// Call to remove all personal settings. /// </summary> public static void Delete() { instance = null; CSFileTools.DeleteFile(Path); }
/// <summary> /// Call to remove all Maintainer Settings (including personal settings). /// </summary> public static void Delete() { instance = null; CSFileTools.DeleteFile(Path); MaintainerPersonalSettings.Delete(); }