private void OnGUI()
        {
            GUI.enabled = _versionCheckRequest == null && _pluginDownloadRequest == null;

            EditorGUILayout.Space();
            EditorGUILayout.LabelField(string.Format(
                                           "This dialog checks for the latest released version of this plugin. " +
                                           "Click the \"{0}\" button to open the GitHub page with a list of all plugin versions.",
                                           PluginReleasesButtonText), EditorStyles.wordWrappedLabel);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton(PluginReleasesButtonText,
                                                 () => { Application.OpenURL("https://github.com/google/play-instant-unity-plugin/releases"); });

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            EditorGUILayout.LabelField(string.Format("Current version: {0}", GooglePlayInstantUtils.PluginVersion));
            EditorGUILayout.LabelField(string.Format("Latest version:  {0}",
                                                     GetNormalizedVersion(_latestReleaseVersion) ?? "unknown"));
            EditorGUILayout.LabelField(string.Format("Latest package:  {0}",
                                                     GetLatestReleasePluginFileName() ?? "unknown"), EditorStyles.wordWrappedLabel);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton(CheckReleasesButtonText, StartVersionCheck);

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            GUI.enabled &= _latestReleaseVersion != null;

            EditorGUILayout.LabelField("Download options", EditorStyles.boldLabel);
            EditorGUILayout.Space();
            EditorGUILayout.LabelField(string.Format(
                                           "Either click \"{0}\" to download and save the latest plugin to disk, " +
                                           " or click \"{1}\" to download and install the latest plugin.",
                                           DownloadAndSaveButtonText, DownloadAndInstallButtonText), EditorStyles.wordWrappedLabel);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton(DownloadAndSaveButtonText, StartPluginDownloadAndSave);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton(DownloadAndInstallButtonText, StartPluginDownloadAndInstall);

            GUI.enabled = true;
        }
Esempio n. 2
0
        private void OnGUI()
        {
            GUI.enabled = _downloadRequest == null;

            EditorGUILayout.Space();
            EditorGUILayout.LabelField(
                "Bundletool is a command line java program used for creating Android App Bundles (.aab files). " +
                "Bundletool is also used to generate a set of APKs from an .aab file.", EditorStyles.wordWrappedLabel);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton("Learn more",
                                                 () => { Application.OpenURL("https://developer.android.com/studio/command-line/bundletool"); });

            EditorGUILayout.Space();
            EditorGUILayout.Space();
            EditorGUILayout.Space();

            EditorGUILayout.LabelField(string.Format("Click \"Download\" to download bundletool version {0}.",
                                                     Bundletool.BundletoolVersion), EditorStyles.wordWrappedLabel);
            EditorGUILayout.Space();
            WindowUtils.CreateRightAlignedButton("Download", StartDownload);

            GUI.enabled = true;
        }