From 60bb50b31e0793e7c3133348dd2caa3644768332 Mon Sep 17 00:00:00 2001 From: Nikita Budanov Date: Sun, 2 Jan 2022 18:10:52 +0300 Subject: [PATCH] Error fix --- UnitySaveSystem/SaveFile.cs | 39 --------------- UnitySaveSystem/SaveFileClassesManager.cs | 47 ------------------ UnitySaveSystem/SaveFileClassesManager1.cs | 32 ------------ UnitySaveSystem/UnitySaveSystem.cs | 15 ------ ...ework,Version=v4.7.2.AssemblyAttributes.cs | 4 -- ...gnTimeResolveAssemblyReferencesInput.cache | Bin 6790 -> 0 bytes ...ySaveSystem.csproj.AssemblyReference.cache | Bin 539 -> 0 bytes .../Debug/UnitySaveSystem.csproj.CopyComplete | 0 ...ySaveSystem.csproj.CoreCompileInputs.cache | 1 - ...nitySaveSystem.csproj.FileListAbsolute.txt | 7 --- UnitySaveSystem/obj/Debug/UnitySaveSystem.dll | Bin 4608 -> 0 bytes UnitySaveSystem/obj/Debug/UnitySaveSystem.pdb | Bin 19968 -> 0 bytes 12 files changed, 145 deletions(-) delete mode 100644 UnitySaveSystem/SaveFile.cs delete mode 100644 UnitySaveSystem/SaveFileClassesManager.cs delete mode 100644 UnitySaveSystem/SaveFileClassesManager1.cs delete mode 100644 UnitySaveSystem/UnitySaveSystem.cs delete mode 100644 UnitySaveSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs delete mode 100644 UnitySaveSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.AssemblyReference.cache delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CopyComplete delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CoreCompileInputs.cache delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.FileListAbsolute.txt delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.dll delete mode 100644 UnitySaveSystem/obj/Debug/UnitySaveSystem.pdb diff --git a/UnitySaveSystem/SaveFile.cs b/UnitySaveSystem/SaveFile.cs deleted file mode 100644 index 12b8273..0000000 --- a/UnitySaveSystem/SaveFile.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.IO; -using UnityEngine; - -namespace UnitySaveSystem -{ - public class SaveFile - { - public readonly string JsonFilePath; - public readonly string SaveFolderPath; - - private SaveFileClassesManager saveClassesManager; - - public T LoadClass() - { - return JsonUtility.FromJson(File.ReadAllText(JsonFilePath)); - } - - public void SaveClass(T classToSave) - { - saveClassesManager.AddClass(classToSave); - } - - public SaveFile(string pathToSave, string saveName) - { - SaveFolderPath = pathToSave + saveName; - JsonFilePath = SaveFolderPath + saveName + ".json"; - if (Directory.Exists(JsonFilePath) == false) - { - Directory.CreateDirectory(SaveFolderPath); - File.Create(pathToSave).Close(); - saveClassesManager = new SaveFileClassesManager(SaveFolderPath); - } - else - { - throw new System.Exception("Save file with the same name already exists"); - } - } - } -} diff --git a/UnitySaveSystem/SaveFileClassesManager.cs b/UnitySaveSystem/SaveFileClassesManager.cs deleted file mode 100644 index fe83e5b..0000000 --- a/UnitySaveSystem/SaveFileClassesManager.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using UnityEngine; - -namespace UnitySaveSystem -{ - class SaveFileClassesManager - { - private List _classesSavePath = new List(); - private readonly string _saveFolderPath; - - public void AddClass(T classToSave) - { - if (Directory.Exists(_saveFolderPath) == false) - Directory.CreateDirectory(Path.Combine(_saveFolderPath, classToSave.ToString() + ".json")); - - var classPath = Path.Combine(_saveFolderPath, classToSave.ToString() + ".json"); - File.AppendAllText(classPath, JsonUtility.ToJson(classToSave)); - _classesSavePath.Add(classPath); - } - - public T GetClass() - where T : new() - { - T Type = new T(); - string classType = Type.ToString(); - - var classPath = Path.Combine(_saveFolderPath, classType.ToString() + ".json"); - return JsonUtility.FromJson(File.ReadAllText(classPath)); - } - - public void RemoveClass(T classToRemove) - { - if (Directory.Exists(_saveFolderPath) == false) - throw new System.Exception("Save file with this name does not exist"); - - - if (_classesSavePath.Remove(Path.Combine(_saveFolderPath, classToRemove.ToString() + ".json")) == false) - throw new System.Exception("Save file with this name does not exist"); - } - - public SaveFileClassesManager(string saveFolderPath) - { - _saveFolderPath = Path.Combine(saveFolderPath, "classes"); - } - } -} \ No newline at end of file diff --git a/UnitySaveSystem/SaveFileClassesManager1.cs b/UnitySaveSystem/SaveFileClassesManager1.cs deleted file mode 100644 index 9c6718f..0000000 --- a/UnitySaveSystem/SaveFileClassesManager1.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using UnityEngine; - -namespace UnitySaveSystem -{ - class SaveFileClassesManager - { - private List _classesSavePath = new List(); - private string _saveFolderPath; - - public void AddClass(T classToSave) - { - if (Directory.Exists(_saveFolderPath) == false) - Directory.CreateDirectory(_saveFolderPath); - - var classPath = Path.Combine(_saveFolderPath, classToSave.ToString() + ".json"); - File.AppendAllText(classPath, JsonUtility.ToJson(classToSave)); - _classesSavePath.Add(classPath); - } - - public void RemoveClass(T classToRemove) - { - - } - - public SaveFileClassesManager(string saveFolderPath) - { - _saveFolderPath = Path.Combine(saveFolderPath, "classes"); - } - } -} diff --git a/UnitySaveSystem/UnitySaveSystem.cs b/UnitySaveSystem/UnitySaveSystem.cs deleted file mode 100644 index 9e26572..0000000 --- a/UnitySaveSystem/UnitySaveSystem.cs +++ /dev/null @@ -1,15 +0,0 @@ -using UnityEngine; -using System.IO; - -namespace UnitySaveSystem -{ - public class UnitySaveSystem : MonoBehaviour - { - public void GetSavesFileFromFolder(string path) - { - var files = Directory.GetFiles(path, "*.json"); - } - } - - -} diff --git a/UnitySaveSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/UnitySaveSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs deleted file mode 100644 index 3871b18..0000000 --- a/UnitySaveSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs +++ /dev/null @@ -1,4 +0,0 @@ -// -using System; -using System.Reflection; -[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/UnitySaveSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/UnitySaveSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index 7bc3f589d3bada499f47dc94f3d68b887929142b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6790 zcmeHMZByGu5VpZ67($9EB?R)~wCOZSjmG93X84f$B`^()Ydf?v$V1N3*<8?zdv^j{ zhTqa((CJTXcO_dk=B52$&E$i{uoioF`|R$m&X1NzG!lvY0~dbc^>74)vCnkw2&XR9 zLnd5emZfVjN6k8x<=A_)RzT~oT8?%33ooS3O((XE+G|CzQb z&MCEbYU!2wT79FQ$rx*CvO>lXa`O(PpIl}dh_`1;%AMw~oHU!1t0lts?4~Ql6IlF& zn5J`1jdwy&t7f+H7n0iOm6(FrS;wxkMuC}hPA9g(3?gY~CThiE-8IbuCl)<-_-SXT zLTWHJdu^=XmqSlE7q_bPII(QAQgMIklXueQxF$r@C}Fqhh*gNW#mMaQ&o6Mn>wV3J}A7r;<&GI~(v`iAx$o1Ier@^*EOiKakRg_3% z6y!)W8dcyIWMt&ev2sgDYC(Cz{^}A7PJK^p%9*ZyfMk8j939;=1)hjQV!E_Q82_{! zOf5^!>_#eS3Ekl)t975T)&Kp7ZETP=eQiCnwX#ann_Jb?eSUnQu7;6^>R{9Qg`0~; zhb0_{s07gjH8I7 zm_RWJVnTTcGNMd@$X%A&%xSv}MEaa?ss&_MQxEc$fJ3IvR@Du4In|+{ZMvDixKbX0 zB|E>Zy=St`QnWHTqdvRPKH5ySmQbE6yz3fna-&-XCGiGr{G6*E;#i7igf%dGg;XY;wW-7CAHv!tTx{_YW zY{kEUzatX~Ofmi{b12kvW?P2x817@LVVcUkcSkR10(Sv3tswPh*=-FH(g60J^vHbj z^~L7;8!ZSX*-j=9-k!7vo?hPo&3CptQO%Z52yc2GEC3t{1+K&NJeWm*F+za}s3@l% z(o;Y>3lk|vBvDb6sqDU!dDzdwj?%-%!g&rz$6-c^ATI#qButP4D%D*n{Yp#%njR+F zZJLZA=K{@p|S7SMj_56eH>v|YERfOKj3%_ihg!o-5@I z=oc<4xA!AkSIS!$9}Fe`5iCtzmdH8sPV87-DJf8;?qunOVp&5rDuq@wUHE=wHKw>%aaPGCa6~CUtf4U!W+; Ab^rhX diff --git a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.AssemblyReference.cache b/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.AssemblyReference.cache deleted file mode 100644 index a70e3ef81e39e318abd470001cf7cc04dabe4eee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmbu5%}T^D5XUoqQS=GC^#MxLEy`k{m#y_83yZ4-As({ZY>B2Rq^(dddfg}T>SK8H zQOt+1E_x80z$DBJ|Nk#Dom|Z`06+*qo+o6cno7~yzur_nebqfbcRZIu83 diff --git a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CopyComplete b/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CopyComplete deleted file mode 100644 index e69de29..0000000 diff --git a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CoreCompileInputs.cache b/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CoreCompileInputs.cache deleted file mode 100644 index 5398df7..0000000 --- a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -c998f8f37228a2cd538b61dda27c355359501816 diff --git a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.FileListAbsolute.txt b/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.FileListAbsolute.txt deleted file mode 100644 index f2a3124..0000000 --- a/UnitySaveSystem/obj/Debug/UnitySaveSystem.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,7 +0,0 @@ -E:\GitProject\FPS\Assets\Plugins\UnitySaveSystem.dll -E:\GitProject\FPS\Assets\Plugins\UnitySaveSystem.pdb -E:\GitProject\SaveSystem\UnitySaveSystem\obj\Debug\UnitySaveSystem.csproj.AssemblyReference.cache -E:\GitProject\SaveSystem\UnitySaveSystem\obj\Debug\UnitySaveSystem.csproj.CoreCompileInputs.cache -E:\GitProject\SaveSystem\UnitySaveSystem\obj\Debug\UnitySaveSystem.csproj.CopyComplete -E:\GitProject\SaveSystem\UnitySaveSystem\obj\Debug\UnitySaveSystem.dll -E:\GitProject\SaveSystem\UnitySaveSystem\obj\Debug\UnitySaveSystem.pdb diff --git a/UnitySaveSystem/obj/Debug/UnitySaveSystem.dll b/UnitySaveSystem/obj/Debug/UnitySaveSystem.dll deleted file mode 100644 index 8fd5874d7cdf89eed29c4a809928ae1ffca8379c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4608 zcmeHKTWlO>75-*yZyd+nIEmd0jgm=h&?X_P^(ENh66|>G#EEZs*DjQmlG)wydXm|h zWoFjRLaBlX6&01BQh7i;RpNn)TTu~IMG;aYR2~St0D>pNMdAe%ka((~;XD8A&32R` zq)G^J)^q-I`_F&Q`LAAh@=NFd(8=%KJ>WIA0+R|q7+t42e)#n`zPJ1Kk=L~O+efk+ zc3@O|ujHF$qhPwO7aDoX@T;z2yGD8`W0bw3m3-)-o}s$y%eEbZoS?Z?GBC_ zd$bhLLrE->#*eWz_)YQy`V_54af_gC23#jYxj+Xle@;y0uhrIB5fOfv0G5Q91imhX z*bbM0Udo1OH?dv!Al?AF+w|S!&$sc((7G0q@83;CoyxTyH#r3ca5?D*eu12dZIXmc zlmyfUlZ-y;TaHIVrMgU|_)>YZt-~a6wm~=AyUa^KV$;!upBO-H7odsoKY#-%4G*&) z`|pGPDK?#nz058_>O{{8#E!4m#U0O6^mt;QDECYL$8YJ01F8^uhfiH4(NFHv;-ZaD z3{dEC2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