Skip to content

Commit bf10d5a

Browse files
committed
Fixed the setting file cannot be saved below unity 2020
1 parent ec53686 commit bf10d5a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Editor/Settings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ private static void LoadData()
7777
}
7878
private static void SaveData()
7979
{
80+
var dir = Path.GetDirectoryName(SettingPath);
81+
if (!Directory.Exists(dir))
82+
Directory.CreateDirectory(dir);
8083
var json = JsonUtility.ToJson(settingData);
8184
File.WriteAllText(SettingPath, json);
8285
}

0 commit comments

Comments
 (0)