diff options
author | chai <215380520@qq.com> | 2023-06-28 21:00:55 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-06-28 21:00:55 +0800 |
commit | 05cb0609b1ddef5380a7c9442605cbfdad4df192 (patch) | |
tree | 1f0414bf1f059d9157772142fd8cf70a5507631c /WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs | |
parent | b97cddeb2c133d563aa78eac87ab3991c233b37f (diff) |
*misc
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs')
-rw-r--r-- | WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs index 3ce2663..ae5a132 100644 --- a/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs +++ b/WorldlineKeepers/Assets/Scripts/Common/CommonFunction.cs @@ -13,6 +13,12 @@ public static class CommonFunction File.Delete(file); } + string dir = Path.GetDirectoryName(file); + if(!Directory.Exists(dir)) + { + Directory.CreateDirectory(dir); + } + File.WriteAllText(file, content); } |