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));
            }
        }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Call to remove all Maintainer Settings (including personal settings).
 /// </summary>
 public static void Delete()
 {
     instance = null;
     CSFileTools.DeleteFile(Path);
     MaintainerPersonalSettings.Delete();
 }