public static void RunBuild(GameLoopMode mode) { var buildPath = GetBuildPath(); var buildExe = GetBuildExe(mode); Debug.Log("Starting " + buildPath + "/" + buildExe); var process = new System.Diagnostics.Process(); process.StartInfo.FileName = Application.dataPath + "/../" + buildPath + "/" + buildExe; process.StartInfo.WorkingDirectory = buildPath; process.Start(); }
static DateTime TimeLastBuildGame(GameLoopMode mode) { string buildPath = GetBuildPath(); if (mode == GameLoopMode.Server) { buildPath += "/Server"; } else if (mode == GameLoopMode.Client) { buildPath += "/Client"; } else if (mode == GameLoopMode.AI) { buildPath += "/AI"; } return(Directory.GetLastWriteTime(buildPath)); }
static string GetBuildExe(GameLoopMode mode) { if (mode == GameLoopMode.Server) { return("Server/Server.exe"); } else if (mode == GameLoopMode.Client) { return("Client/Client.exe"); } else if (mode == GameLoopMode.AI) { return("AI/AI.exe"); } else { return(""); } }