1
0
Fork 0

Oops, I did it again

This commit is contained in:
Piegames 2018-04-25 23:40:51 +02:00
parent 04829fe1b2
commit 033ea1a740

View file

@ -41,8 +41,11 @@ public class BuildSrcipt
} }
public static void BuildPlatform(String platformName, BuildTarget target) { public static void BuildPlatform(String platformName, BuildTarget target) {
if (!Directory.Exists("./Build"))
Directory.CreateDirectory("./Build");
if (Directory.Exists("./" + name + "_" + platformName)) if (Directory.Exists("./" + name + "_" + platformName))
Directory.Delete("./" + name + "_" + platformName, true); Directory.Delete("./" + name + "_" + platformName, true);
if (File.Exists("./Build/DungeonDrifter_" + platformName + ".zip"))
File.Delete("./Build/DungeonDrifter_" + platformName + ".zip"); File.Delete("./Build/DungeonDrifter_" + platformName + ".zip");
BuildPipeline.BuildPlayer(scenes, "./" + name + "_" + platformName + "/" + name, target, BuildOptions.None); BuildPipeline.BuildPlayer(scenes, "./" + name + "_" + platformName + "/" + name, target, BuildOptions.None);
//System.Diagnostics.Process.Start("zip -r Build/DungeonDrifter_" + platformName + ".zip " + platformName + "_" + platformName); //System.Diagnostics.Process.Start("zip -r Build/DungeonDrifter_" + platformName + ".zip " + platformName + "_" + platformName);