コード例 #1
0
        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));
            }
        }
コード例 #2
0
 /// <summary>
 /// Call to save any changes in any settings.
 /// </summary>
 public static void Save()
 {
     SaveInstance(Instance);
     MaintainerPersonalSettings.Save();
 }
コード例 #3
0
 /// <summary>
 /// Call to remove all personal settings.
 /// </summary>
 public static void Delete()
 {
     instance = null;
     CSFileTools.DeleteFile(Path);
 }
コード例 #4
0
 /// <summary>
 /// Call to remove all Maintainer Settings (including personal settings).
 /// </summary>
 public static void Delete()
 {
     instance = null;
     CSFileTools.DeleteFile(Path);
     MaintainerPersonalSettings.Delete();
 }