Пример #1
0
        private static void ShowInstallButton()
        {
            var buttonWidth = 250;

            GUILayout.Space(5);
            using (new AppCenterGuiFieldHelper.UnityHorizontal(AppCenterEditorHelper.uiStyle.GetStyle("gpStyleEmpty")))
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Install all App Center SDK packages", AppCenterEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32)))
                {
                    IsInstalling = true;
                    try
                    {
                        PackagesInstaller.ImportLatestSDK(GetNotInstalledPackages(), LatestSdkVersion);
                    }
                    catch (Exception exception)
                    {
                        EdExLogger.LoggerInstance.LogError("Failed to install SDK packages: " + exception);
                        IsInstalling = false;
                    }
                }
                GUILayout.FlexibleSpace();
            }
            GUILayout.Space(5);
        }
 private static void UpgradeSdk()
 {
     if (EditorUtility.DisplayDialog("Confirm SDK Upgrade", "This action will remove the current App Center SDK and install the lastet version.", "Confirm", "Cancel"))
     {
         IEnumerable <AppCenterSDKPackage> installedPackages = AppCenterSDKPackage.GetInstalledPackages();
         RemoveSdkBeforeUpdate();
         PackagesInstaller.ImportLatestSDK(installedPackages, LatestSdkVersion, AppCenterEditorPrefsSO.Instance.SdkPath);
     }
 }
Пример #3
0
 private void ImportLatestPackageSDK()
 {
     try
     {
         PackagesInstaller.ImportLatestSDK(new[] { this }, AppCenterEditorSDKTools.LatestSdkVersion);
     }
     catch (Exception exception)
     {
         EdExLogger.LoggerInstance.LogError("Failed to import package: " + exception);
         AppCenterEditorSDKTools.IsInstalling = IsPackageInstalling = false;
     }
 }
        private static void ShowInstallButton()
        {
            var buttonWidth = 250;

            GUILayout.Space(5);
            using (new AppCenterGuiFieldHelper.UnityHorizontal(AppCenterEditorHelper.uiStyle.GetStyle("gpStyleEmpty")))
            {
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Install all App Center SDK packages", AppCenterEditorHelper.uiStyle.GetStyle("Button"), GUILayout.MaxWidth(buttonWidth), GUILayout.MinHeight(32)))
                {
                    IsInstalling = true;
                    PackagesInstaller.ImportLatestSDK(GetNotInstalledPackages(), LatestSdkVersion);
                }
                GUILayout.FlexibleSpace();
            }
            GUILayout.Space(5);
        }
Пример #5
0
 private static void UpgradeSdk()
 {
     if (EditorUtility.DisplayDialog("Confirm SDK Upgrade", "This action will remove the current App Center SDK and install the lastet version.", "Confirm", "Cancel"))
     {
         try
         {
             var installedPackages = AppCenterSDKPackage.GetInstalledPackages();
             RemoveSdkBeforeUpdate();
             PackagesInstaller.ImportLatestSDK(installedPackages, LatestSdkVersion, AppCenterEditorPrefsSO.Instance.SdkPath);
         }
         catch (Exception exception)
         {
             EdExLogger.LoggerInstance.LogError("Failed to upgrade SDK: " + exception);
             IsUpgrading = false;
         }
     }
 }
Пример #6
0
 private void ImportLatestPackageSDK()
 {
     PackagesInstaller.ImportLatestSDK(new[] { this }, AppCenterEditorSDKTools.LatestSdkVersion);
 }