Skip to content

GetSavedFiles exception fix #9

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">Gameframe.SaveLoad 👋</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-1.0.5-blue.svg?cacheSeconds=2592000" />
<img alt="Version" src="https://img.shields.io/badge/version-1.0.6-blue.svg?cacheSeconds=2592000" />
<a href="https://twitter.com/Cory Leach">
<img alt="Twitter: coryleach" src="https://img.shields.io/twitter/follow/coryleach.svg?style=social" target="_blank" />
</a>
Expand All @@ -13,15 +13,15 @@ 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)<br/>
Select "Add package from git URL...", fill in the pop-up with the following link:<br/>
https://github.com/coryleach/UnitySaveLoad.git#1.0.5<br/>
https://github.com/coryleach/UnitySaveLoad.git#1.0.6<br/>

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

Find the manifest.json file in the Packages folder of your project and edit it to look like this:
```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",
...
},
}
Expand Down
7 changes: 7 additions & 0 deletions Runtime/SaveLoadUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ public static object Load(System.Type objectType, ISerializationMethod serializa
public static IEnumerable<string> 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);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down