From 033ea1a74041cc069f81fb3ca28279805430a46c Mon Sep 17 00:00:00 2001 From: Piegames <14054505+piegamesde@users.noreply.github.com> Date: Wed, 25 Apr 2018 23:40:51 +0200 Subject: [PATCH] Oops, I did it again --- Assets/Scripts/Editor/BuildScript.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Editor/BuildScript.cs b/Assets/Scripts/Editor/BuildScript.cs index a98612d..c3edd60 100644 --- a/Assets/Scripts/Editor/BuildScript.cs +++ b/Assets/Scripts/Editor/BuildScript.cs @@ -41,9 +41,12 @@ public class BuildSrcipt } public static void BuildPlatform(String platformName, BuildTarget target) { + if (!Directory.Exists("./Build")) + Directory.CreateDirectory("./Build"); if (Directory.Exists("./" + name + "_" + platformName)) Directory.Delete("./" + name + "_" + platformName, true); - File.Delete("./Build/DungeonDrifter_" + platformName + ".zip"); + if (File.Exists("./Build/DungeonDrifter_" + platformName + ".zip")) + File.Delete("./Build/DungeonDrifter_" + platformName + ".zip"); BuildPipeline.BuildPlayer(scenes, "./" + name + "_" + platformName + "/" + name, target, BuildOptions.None); //System.Diagnostics.Process.Start("zip -r Build/DungeonDrifter_" + platformName + ".zip " + platformName + "_" + platformName); }