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);
     }
 }
Beispiel #2
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;
         }
     }
 }
 public static void DisplayPackagePanel(AppCenterSDKPackage sdkPackage)
 {
     using (new AppCenterGuiFieldHelper.UnityVertical(AppCenterEditorHelper.uiStyle.GetStyle("gpStyleGray1")))
     {
         using (new AppCenterGuiFieldHelper.UnityHorizontal(AppCenterEditorHelper.uiStyle.GetStyle("gpStyleClear")))
         {
             GUILayout.FlexibleSpace();
             if (sdkPackage.IsInstalled)
             {
                 sdkPackage.ShowPackageInstalledMenu();
             }
             else
             {
                 sdkPackage.ShowPackageNotInstalledMenu();
             }
             GUILayout.FlexibleSpace();
         }
     }
 }