Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit f3fb9e4

Browse files
committed
fix: correct AfterLoad if no save
1 parent 2d67ac0 commit f3fb9e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Packages/com.nuclearband.sodatabase/Runtime/SODatabase.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,11 @@ public static async void Load()
156156

157157
public static async Task LoadAsync()
158158
{
159-
if (!File.Exists(SavePath))
159+
if (!File.Exists(SavePath)) {
160+
foreach (var dataNode in DataNodes(root))
161+
dataNode.AfterLoad();
160162
return;
163+
}
161164

162165
using var fileStream = new StreamReader(SavePath);
163166
var serializedDictionary = await fileStream.ReadToEndAsync();

0 commit comments

Comments
 (0)