private void BuildAndUpload() { Assert.IsTrue(IsBuildLocationSelected); Assert.IsNull(VersionLabelValidationError); Assert.IsNull(VersionChangelogValidationError); if (AppBuild.TryCreate()) { ApiKey?apiKey = Config.GetLinkedAccountApiKey(); Assert.IsTrue(apiKey.HasValue); EditorUtility.DisplayProgressBar("Preparing upload...", "", 0.0f); try { using (var tools = new Tools.PatchKitToolsClient()) { tools.MakeVersion( apiKey.Value.Value, _appSecret, _versionLabel, _versionChangelog, Path.GetDirectoryName(BuildLocation), _publishOnUpload, _overwriteDraftVersion); } } finally { EditorUtility.ClearProgressBar(); } EditorUtility.DisplayDialog( "Uploading", "Your game has been successfully built and is being uploaded right now.\n\n" + "You can track the progress in console window.", "OK"); Close(); } }
private void ChangeBuildLocation() { AppBuild.OpenLocationDialog(); }