blob: ae5a132adda97fdaa09d66609bbe9839956f7810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
public static class CommonFunction
{
public static void WriteFile(string content, string file)
{
if(File.Exists(file))
{
File.Delete(file);
}
string dir = Path.GetDirectoryName(file);
if(!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
File.WriteAllText(file, content);
}
}
|