Skip to content

Commit 87e1d10

Browse files
committed
Only created resources dir if env file exists.
1 parent 8ec345b commit 87e1d10

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Editor/Scripts/BuildTools.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ public void OnPreprocessBuild(BuildReport report)
3535

3636
}
3737

38-
if (!Directory.Exists(env.resourcesDirPath))
38+
if (File.Exists(env.editorFilePath))
3939
{
4040

41-
Directory.CreateDirectory(env.resourcesDirPath);
41+
if (!Directory.Exists(env.resourcesDirPath))
42+
{
4243

43-
_resourcesDirCreated = true;
44+
Directory.CreateDirectory(env.resourcesDirPath);
4445

45-
}
46+
_resourcesDirCreated = true;
4647

47-
if (File.Exists(env.editorFilePath))
48-
{
48+
}
4949

5050
FileUtil.CopyFileOrDirectory(env.editorFilePath, env.runtimeFilePath);
5151

0 commit comments

Comments
 (0)