diff --git a/README.md b/README.md index c011804..842a096 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Gameframe.SaveLoad 👋

- Version + Version Twitter: coryleach @@ -13,7 +13,7 @@ Serialization helper utility that supports save, load and encryption. #### Using UnityPackageManager (for Unity 2019.3 or later) Open the package manager window (menu: Window > Package Manager)
Select "Add package from git URL...", fill in the pop-up with the following link:
-https://github.com/coryleach/UnitySaveLoad.git#1.0.5
+https://github.com/coryleach/UnitySaveLoad.git#1.0.6
#### Using UnityPackageManager (for Unity 2019.1 or later) @@ -21,7 +21,7 @@ Find the manifest.json file in the Packages folder of your project and edit it t ```js { "dependencies": { - "com.gameframe.saveload": "https://github.com/coryleach/UnitySaveLoad.git#1.0.5", + "com.gameframe.saveload": "https://github.com/coryleach/UnitySaveLoad.git#1.0.6", ... }, } diff --git a/Runtime/SaveLoadUtility.cs b/Runtime/SaveLoadUtility.cs index 2b23ce4..1c1ac8f 100644 --- a/Runtime/SaveLoadUtility.cs +++ b/Runtime/SaveLoadUtility.cs @@ -108,6 +108,13 @@ public static object Load(System.Type objectType, ISerializationMethod serializa public static IEnumerable EnumerateSavedFiles(string folderName = null, string baseFolderPath = null) { var savePath = GetSavePath(folderName,baseFolderPath); + + //If directory does not exist we're done + if (!Directory.Exists(savePath)) + { + yield break; + } + foreach ( var file in Directory.EnumerateFiles(savePath,"*",SearchOption.AllDirectories) ) { yield return Path.GetFileName(file); diff --git a/package.json b/package.json index 90fd3af..4276b20 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.gameframe.saveload", "displayName": "Gameframe.SaveLoad", - "version": "1.0.5", + "version": "1.0.6", "description": "Serialization helper utility that supports save, load and encryption.", "keywords": [], "author": {