Ejemplo n.º 1
0
 public static void RemoveMobiledgeX()
 {
     if (EditorUtility.DisplayDialog("MobiledgeX", "Choosing Remove will delete MobiledgeX package and close Unity Editor", "Remove", "Cancel"))
     {
         Enhancement.SDKRemoved(getId());
         if (Directory.Exists(Path.Combine("Assets", "Plugins/MobiledgeX")))
         {
             Directory.Delete(Path.Combine("Assets", "Plugins/MobiledgeX"), true);
             File.Delete(Path.Combine("Assets", "Plugins/MobiledgeX") + ".meta");
         }
         EditorPrefs.DeleteKey("mobiledgex-user");
         AssetDatabase.Refresh();
         Client.Remove("com.mobiledgex.sdk");
         EditorApplication.Exit(0);
     }
 }
 public static void RemoveMobiledgeX()
 {
     if (EditorUtility.DisplayDialog("MobiledgeX", "Choosing Remove will delete MobiledgeX package and restart the Unity Editor", "Remove", "Cancel"))
     {
         Enhancement.SDKRemoved(getId());
         if (Directory.Exists(Path.Combine("Assets", "Plugins/MobiledgeX")))
         {
             Directory.Delete(Path.Combine("Assets", "Plugins/MobiledgeX"), true);
             File.Delete(Path.Combine("Assets", "Plugins/MobiledgeX") + ".meta");
         }
         EditorPrefs.DeleteKey("mobiledgex-user");
         AssetDatabase.Refresh();
         RemoveRequest removeRequest = Client.Remove("com.mobiledgex.sdk");
         while (removeRequest.Status != StatusCode.Success)
         {
             if (removeRequest.Status == StatusCode.Failure)
             {
                 Debug.LogError("Error Removing MobiledgeX Package, Please remove the package using the package manager.");
                 break;
             }
         }
         EditorApplication.OpenProject(Directory.GetCurrentDirectory());
     }
 }