public void SaveSettings() { BuildAllSettings.SetSetting("BinaryName", _binaryName); BuildAllSettings.SetSetting("Release", _release); BuildAllSettings.SetSetting("PublishRoot", _publishRoot); BuildAllSettings.SetSetting("PackageFolder", _packageFolder); BuildAllSettings.SetSetting("BuildWindows", _buildWindows.ToString()); BuildAllSettings.SetSetting("BuildWindows64", _buildWindows64.ToString()); BuildAllSettings.SetSetting("BuildLinux", _buildLinux.ToString()); BuildAllSettings.SetSetting("BuildWeb", _buildWeb.ToString()); BuildAllSettings.SetSetting("BuildPackage", _buildPackage.ToString()); BuildAllSettings.SetSetting("BuildAndroid", _buildAndroid.ToString()); }
public BuildAll() { title = "Build All"; _binaryName = BuildAllSettings.GetSetting("BinaryName"); _release = BuildAllSettings.GetSetting("Release"); _publishRoot = BuildAllSettings.GetSetting("PublishRoot"); _packageFolder = BuildAllSettings.GetSetting("PackageFolder"); _buildWindows = bool.Parse(BuildAllSettings.GetSetting("BuildWindows")); _buildWindows64 = bool.Parse(BuildAllSettings.GetSetting("BuildWindows64")); _buildLinux = bool.Parse(BuildAllSettings.GetSetting("BuildLinux")); _buildWeb = bool.Parse(BuildAllSettings.GetSetting("BuildWeb")); _buildPackage = bool.Parse(BuildAllSettings.GetSetting("BuildPackage")); _buildAndroid = bool.Parse(BuildAllSettings.GetSetting("BuildAndroid")); }
public static void PublishAll() { var publishRoot = BuildAllSettings.GetSetting("PublishRoot"); var release = BuildAllSettings.GetSetting("Release"); var binaryName = BuildAllSettings.GetSetting("BinaryName"); var publishFolder = publishRoot + "/Release" + release; var buildWindows = bool.Parse(BuildAllSettings.GetSetting("BuildWindows")); var buildWindows64 = bool.Parse(BuildAllSettings.GetSetting("BuildWindows64")); var buildLinux = bool.Parse(BuildAllSettings.GetSetting("BuildLinux")); var buildWeb = bool.Parse(BuildAllSettings.GetSetting("BuildWeb")); var buildPackage = bool.Parse(BuildAllSettings.GetSetting("BuildPackage")); var buildAndroid = bool.Parse(BuildAllSettings.GetSetting("BuildAndroid")); if (Directory.Exists(publishFolder)) { Directory.Delete(publishFolder, true); } Directory.CreateDirectory(publishFolder); if (buildPackage) { File.Copy(ReleaseFolder + "Package/" + binaryName + ".unitypackage", publishFolder + "/" + binaryName + ".unitypackage"); } if (buildAndroid) { File.Copy(ReleaseFolder + "Android/" + binaryName + ".apk", publishFolder + "/" + binaryName + ".apk"); } if (buildWindows) { ZipFolder(ReleaseFolder + "Windows", publishFolder + "/" + binaryName + "-Windows.zip"); } if (buildWindows64) { ZipFolder(ReleaseFolder + "Windows 64", publishFolder + "/" + binaryName + "-Windows64.zip"); } if (buildLinux) { ZipFolder(ReleaseFolder + "Linux", publishFolder + "/" + binaryName + "-Linux-Universal.zip"); } if (buildWeb) { CopyFolder(ReleaseFolder + "Web", publishFolder); } EditorUtility.DisplayDialog("Publish Complete", "", "Ok"); }
public static void Build() { var scenes = (from s in EditorBuildSettings.scenes where s.enabled select s.path).ToArray(); var binaryName = BuildAllSettings.GetSetting("BinaryName"); var buildWindows = bool.Parse(BuildAllSettings.GetSetting("BuildWindows")); var buildWindows64 = bool.Parse(BuildAllSettings.GetSetting("BuildWindows64")); var buildLinux = bool.Parse(BuildAllSettings.GetSetting("BuildLinux")); var buildWeb = bool.Parse(BuildAllSettings.GetSetting("BuildWeb")); var buildPackage = bool.Parse(BuildAllSettings.GetSetting("BuildPackage")); var buildAndroid = bool.Parse(BuildAllSettings.GetSetting("BuildAndroid")); //Build Players - Add more or comment out as needed if (buildWindows) { BuildPlayer(scenes, ReleaseFolder + "Windows", binaryName + ".exe", BuildTarget.StandaloneWindows, BuildOptions.None); } if (buildWindows64) { BuildPlayer(scenes, ReleaseFolder + "Windows 64", binaryName + "64.exe", BuildTarget.StandaloneWindows64, BuildOptions.None); } if (buildWeb) { BuildPlayer(scenes, ReleaseFolder + "Web", binaryName, BuildTarget.WebPlayer, BuildOptions.None); } if (buildLinux) { BuildPlayer(scenes, ReleaseFolder + "Linux", binaryName, BuildTarget.StandaloneLinuxUniversal, BuildOptions.None); } if (buildAndroid) { BuildPlayer(scenes, ReleaseFolder + "Android", binaryName + ".apk", BuildTarget.Android, BuildOptions.None); } //Export packages if (buildPackage) { BuildPackage("Assets/Packages/BuildAll", ReleaseFolder + "Package", binaryName + ".unitypackage"); } EditorUtility.DisplayDialog("Build Complete", "", "Ok"); }
public void OnEnable() { title = "Build All"; _settings = (BuildAllSettings)AssetDatabase.LoadMainAssetAtPath("Assets/Packages/BuildAll/Editor/Settings.asset"); }
public void OnEnable() { title = "Build All"; _settings = (BuildAllSettings)AssetDatabase.LoadMainAssetAtPath("Assets/Packages/BuildAll/Editor/Settings.asset"); }