Skip to content

Commit 40a133d

Browse files
authored
Merge pull request #9 from coryleach/dev
GetSavedFiles exception fix
2 parents df9c9c8 + 9087c7b commit 40a133d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h1 align="center">Gameframe.SaveLoad 👋</h1>
22
<p>
3-
<img alt="Version" src="https://img.shields.io/badge/version-1.0.5-blue.svg?cacheSeconds=2592000" />
3+
<img alt="Version" src="https://img.shields.io/badge/version-1.0.6-blue.svg?cacheSeconds=2592000" />
44
<a href="https://twitter.com/Cory Leach">
55
<img alt="Twitter: coryleach" src="https://img.shields.io/twitter/follow/coryleach.svg?style=social" target="_blank" />
66
</a>
@@ -13,15 +13,15 @@ Serialization helper utility that supports save, load and encryption.
1313
#### Using UnityPackageManager (for Unity 2019.3 or later)
1414
Open the package manager window (menu: Window > Package Manager)<br/>
1515
Select "Add package from git URL...", fill in the pop-up with the following link:<br/>
16-
https://github.com/coryleach/UnitySaveLoad.git#1.0.5<br/>
16+
https://github.com/coryleach/UnitySaveLoad.git#1.0.6<br/>
1717

1818
#### Using UnityPackageManager (for Unity 2019.1 or later)
1919

2020
Find the manifest.json file in the Packages folder of your project and edit it to look like this:
2121
```js
2222
{
2323
"dependencies": {
24-
"com.gameframe.saveload": "https://github.com/coryleach/UnitySaveLoad.git#1.0.5",
24+
"com.gameframe.saveload": "https://github.com/coryleach/UnitySaveLoad.git#1.0.6",
2525
...
2626
},
2727
}

Runtime/SaveLoadUtility.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ public static object Load(System.Type objectType, ISerializationMethod serializa
108108
public static IEnumerable<string> EnumerateSavedFiles(string folderName = null, string baseFolderPath = null)
109109
{
110110
var savePath = GetSavePath(folderName,baseFolderPath);
111+
112+
//If directory does not exist we're done
113+
if (!Directory.Exists(savePath))
114+
{
115+
yield break;
116+
}
117+
111118
foreach ( var file in Directory.EnumerateFiles(savePath,"*",SearchOption.AllDirectories) )
112119
{
113120
yield return Path.GetFileName(file);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.gameframe.saveload",
33
"displayName": "Gameframe.SaveLoad",
4-
"version": "1.0.5",
4+
"version": "1.0.6",
55
"description": "Serialization helper utility that supports save, load and encryption.",
66
"keywords": [],
77
"author": {

0 commit comments

Comments
 (0)