Skip to content

Commit f249af7

Browse files
committed
fix(data): check for game data before loading for main menu
1 parent 8f37eee commit f249af7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎Assets/Scripts/Tools/DataHandler.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ public static GameData SerializeGameData()
193193
Application.persistentDataPath,
194194
BinarySerializable.DATA_DIRECTORY,
195195
"Games");
196+
if (!Directory.Exists(rootPath))
197+
return;
196198
string[] gameDirs = Directory.GetDirectories(rootPath);
197199

198200
// filter to keep only game folders with a game save

0 commit comments

Comments
 (0)