Пример #1
0
 public static void RemoveOneSignal()
 {
     RemoveNativeFileIOS("libOneSignal");
     RemoveNativeFileIOS("OneSignal");
     RemoveNativeFileIOS("OneSignalUnityRuntime");
     FileStaticAPI.DeleteFolder("StansAssetsCommon/OneSignal");
 }
Пример #2
0
    private static void RemoveAndroidPart()
    {
        FileStaticAPI.DeleteFile(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "androidnative.jar");
        FileStaticAPI.DeleteFile(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "mobilenativepopups.jar");

        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "libs");
    }
Пример #3
0
    public static void RemovePlugin(bool SaveSettings = true)
    {
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Addons");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Core");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Documentation");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Editor");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Enum");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/GameCenter");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/iAd");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/iCloud");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Market");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Notifications");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Other");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/PopUps");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Social");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/Templates");
        FileStaticAPI.DeleteFolder("Extensions/IOSNative/xExample");

        if (!SaveSettings)
        {
            FileStaticAPI.DeleteFolder("Extensions/IOSNative/Resources");
            FileStaticAPI.DeleteFolder("Extensions/IOSNative");
        }

        RemoveNativeFile("AppEventListener");
        RemoveNativeFile("CloudManager");
        RemoveNativeFile("CustomBannerView");
        RemoveNativeFile("iAdBannerController");
        RemoveNativeFile("iAdBannerObject");
        RemoveNativeFile("InAppPurchaseManager");
        RemoveNativeFile("IOSNativeNotificationCenter");
        RemoveNativeFile("ISN_GameCenterListner");
        RemoveNativeFile("ISN_GameCenterManager");
        RemoveNativeFile("ISN_GameCenterRTM");
        RemoveNativeFile("ISN_GameCenterTBM");
        RemoveNativeFile("ISN_NativePopUpsManager");
        RemoveNativeFile("ISN_NativeUtility");
        RemoveNativeFile("ISN_NSData+Base64");
        RemoveNativeFile("ISN_Reachability");
        RemoveNativeFile("ISN_Security");
        RemoveNativeFile("ISNCamera");
        RemoveNativeFile("ISNDataConvertor");
        RemoveNativeFile("ISNVideo");
        RemoveNativeFile("SKProduct+LocalizedPrice");
        RemoveNativeFile("SocialGate");
        RemoveNativeFile("StoreProductView");
        RemoveNativeFile("TransactionServer");


        AssetDatabase.Refresh();
    }
Пример #4
0
    private static void RemoveAndroidPart()
    {
        FileStaticAPI.DeleteFile(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "androidnative.jar");
        FileStaticAPI.DeleteFile(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "mobilenativepopups.jar");


        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "libs");


        FileStaticAPI.DeleteFolder("Plugins/Android/res/values/analytics.xml");
        FileStaticAPI.DeleteFolder("Plugins/Android/res/values/ids.xml");
        FileStaticAPI.DeleteFolder("Plugins/Android/res/values/version.xml");
        FileStaticAPI.DeleteFolder("Plugins/Android/res/xml/file_paths.xml");
    }
    public static void Remove_FB_SDK()
    {
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
        FileStaticAPI.DeleteFolder("Facebook");
        FileStaticAPI.DeleteFolder("Extensions/GooglePlayCommon/Social/Facebook");


        //AM
        FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAndroidUseExample.cs");
        FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAnalyticsExample.cs");
        FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAndroidTurnBasedAndGiftsExample.cs");


        //MSP
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSPFacebookUseExample.cs");
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAnalyticsExample.cs");
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAndroidTurnBasedAndGiftsExample.cs");

        ChnageDefineState(AN_SoomlaGrowContent, "FACEBOOK_ENABLED", false);
    }
    public static void Remove_FB_SDK()
    {
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
        FileStaticAPI.DeleteFolder("Plugins/facebook", false);
        FileStaticAPI.DeleteFolder("Facebook", false);

        //MSP
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSPFacebookUseExample.cs", false);
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAnalyticsExample.cs", false);
        FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAndroidTurnBasedAndGiftsExample.cs", false);

        //FB v7
        FileStaticAPI.DeleteFolder("Examples", false);
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.IOS_DESTANATION_PATH + "Facebook", false);


        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "libs/bolts-android-1.2.0.jar");
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "libs/facebook-android-sdk-4.7.0.jar");
        FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "libs/facebook-android-wrapper-release.jar");

        AssetDatabase.Refresh();
    }
    public static void Android_InstallPlugin(bool IsFirstInstall = true)
    {
        //Unity 5 upgdare:
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/httpclient-4.3.1.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/signpost-commonshttp4-1.2.1.2.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/signpost-core-1.2.1.2.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/libGoogleAnalyticsServices.jar");

        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/android-support-v4.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/image-chooser-library-1.3.0.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/twitter4j-core-3.0.5.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "libs/google-play-services.jar");


        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "social/an_social.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "social/twitter4j-core-3.0.5.jar");


        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "google_play/an_googleplay.jar");
        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "google_play/google-play-services.jar");

        FileStaticAPI.DeleteFile(ANDROID_SOURCE_PATH + "billing/an_billing.jar");



        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + "libs/android-support-v4.txt", ANDROID_DESTANATION_PATH + "libs/android-support-v4.jar");
        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + "androidnative.txt", ANDROID_DESTANATION_PATH + "androidnative.jar");
        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + "mobilenativepopups.txt", ANDROID_DESTANATION_PATH + "mobilenativepopups.jar");



        FileStaticAPI.CopyFolder(ANDROID_SOURCE_PATH + "facebook", ANDROID_DESTANATION_PATH + "facebook");

                #if UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6
                #else
        FileStaticAPI.DeleteFolder(ANDROID_SOURCE_PATH + "facebook");
                #endif

        if (IsFirstInstall)
        {
            EnableBillingAPI();
            EnableGooglePlayAPI();
            EnableSocialAPI();
            EnableCameraAPI();
            EnableAppLicensingAPI();
        }



        string file;
        file = "AN_Res/res/values/analytics.xml";
        if (!FileStaticAPI.IsFileExists(ANDROID_DESTANATION_PATH + file))
        {
            FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);
        }


        file = "AN_Res/res/values/ids.xml";
        if (!FileStaticAPI.IsFileExists(ANDROID_DESTANATION_PATH + file))
        {
            FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);
        }

        file = "AN_Res/res/xml/file_paths.xml";
        if (!FileStaticAPI.IsFileExists(ANDROID_DESTANATION_PATH + file))
        {
            FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);
        }


        file = "AN_Res/res/values/version.xml";
        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);

        file = "AN_Res/project.properties";
        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);

        file = "AN_Res/AndroidManifest.xml";
        FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);

        //First install dependense

        file = "AndroidManifest.xml";
        if (!FileStaticAPI.IsFileExists(ANDROID_DESTANATION_PATH + file))
        {
            FileStaticAPI.CopyFile(ANDROID_SOURCE_PATH + file, ANDROID_DESTANATION_PATH + file);
        }

        AssetDatabase.Refresh();
    }
Пример #8
0
    private static void ProcessRemove()
    {
        FileStaticAPI.DeleteFolder("Extensions/AllDocumentation");
        FileStaticAPI.DeleteFolder("Extensions/FlashLikeEvents");
        FileStaticAPI.DeleteFolder("Extensions/AndroidManifestManager");
        FileStaticAPI.DeleteFolder("Extensions/GooglePlayCommon");
        FileStaticAPI.DeleteFolder("Extensions/StansAssetsCommon");
        FileStaticAPI.DeleteFolder("Extensions/StansAssetsPreviewUI");
        FileStaticAPI.DeleteFolder("Extensions/IOSDeploy");


        if (SA_VersionsManager.Is_AN_Installed)
        {
            FileStaticAPI.DeleteFolder("Extensions/AndroidNative");
            RemoveAndroidPart();
        }


        if (SA_VersionsManager.Is_MSP_Installed)
        {
            FileStaticAPI.DeleteFolder("Extensions/MobileSocialPlugin");
            RemoveIOSPart();
            RemoveAndroidPart();
        }


        if (SA_VersionsManager.Is_GMA_Installed)
        {
            FileStaticAPI.DeleteFolder("Extensions/GoogleMobileAd");
            RemoveIOSPart();
            RemoveAndroidPart();
            RemoveWP8Part();
        }



        if (SA_VersionsManager.Is_ISN_Installed)
        {
            FileStaticAPI.DeleteFolder("Extensions/IOSNative");
            RemoveIOSPart();
        }


        if (SA_VersionsManager.Is_UM_Installed)
        {
            FileStaticAPI.DeleteFolder("Extensions/UltimateMobile");
            FileStaticAPI.DeleteFolder("Extensions/WP8Native");
            FileStaticAPI.DeleteFolder("WebPlayerTemplates");
            FileStaticAPI.DeleteFolder("Extensions/GoogleAnalytics");
            FileStaticAPI.DeleteFolder("Extensions/MobileNativePopUps");

            RemoveWP8Part();
            RemoveIOSPart();
            RemoveAndroidPart();
        }


        FileStaticAPI.DeleteFolder("Plugins/StansAssets");
        AssetDatabase.Refresh();


        EditorUtility.DisplayDialog("Plugins Removed", "Unity Editor relaunch required.", "Okay");
    }
    private void Actions()
    {
        EditorGUILayout.Space();


        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Keep Android Mnifest Clean");

        EditorGUI.BeginChangeCheck();
        SocialPlatfromSettings.Instance.KeepManifestClean = EditorGUILayout.Toggle(SocialPlatfromSettings.Instance.KeepManifestClean);
        if (EditorGUI.EndChangeCheck())
        {
            UpdateManifest();
        }

        if (GUILayout.Button("[?]", GUILayout.Width(25)))
        {
            Application.OpenURL("http://goo.gl/018lnQ");
        }
        EditorGUILayout.Space();
        EditorGUILayout.Space();

        EditorGUILayout.EndHorizontal();


        SocialPlatfromSettings.Instance.ShowAPIS = EditorGUILayout.Foldout(SocialPlatfromSettings.Instance.ShowAPIS, "Mobile Social Plugin APIs");
        if (SocialPlatfromSettings.Instance.ShowAPIS)
        {
            EditorGUI.indentLevel++;

            EditorGUI.BeginChangeCheck();
            DrawAPIsList();
            if (EditorGUI.EndChangeCheck())
            {
                UpdateManifest();
            }


            EditorGUI.indentLevel--;
            EditorGUILayout.Space();
        }

        SocialPlatfromSettings.Instance.ShowActions = EditorGUILayout.Foldout(SocialPlatfromSettings.Instance.ShowActions, "More Actions");
        if (SocialPlatfromSettings.Instance.ShowActions)
        {
            if (!IsFacebookInstalled)
            {
                GUI.enabled = false;
            }

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

            if (GUILayout.Button("Remove Facebook SDK", GUILayout.Width(160)))
            {
                bool result = EditorUtility.DisplayDialog(
                    "Removing Facebook SDK",
                    "Warning action can not be undone without reimporting the plugin",
                    "Remove",
                    "Cansel");
                if (result)
                {
                    FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
                    FileStaticAPI.DeleteFolder("Facebook");
                    FileStaticAPI.DeleteFolder("Extensions/GooglePlayCommon/Social/Facebook");
                    FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSPFacebookUseExample.cs");
                    FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAnalyticsExample.cs");
                    FileStaticAPI.DeleteFile("Extensions/MobileSocialPlugin/Example/Scripts/MSP_FacebookAndroidTurnBasedAndGiftsExample.cs");
                    FileStaticAPI.CopyFile("Extensions/StansAssetsCommon/SA_FB_PlaceHolder.txt", "Extensions/StansAssetsCommon/SA_FB_PlaceHolder.cs");
                }
            }

            if (GUILayout.Button("Reset Settings", GUILayout.Width(160)))
            {
                ResetSettings();
            }

            GUI.enabled = true;


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


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


            if (GUILayout.Button("Load Example Settings", GUILayout.Width(160)))
            {
                LoadExampleSettings();
            }


            if (GUILayout.Button("Reinstall", GUILayout.Width(160)))
            {
                PluginsInstalationUtil.Android_UpdatePlugin();
                PluginsInstalationUtil.IOS_UpdatePlugin();
                UpdateVersionInfo();
            }

            EditorGUILayout.EndHorizontal();
        }
    }
Пример #10
0
    private void Actions()
    {
        AndroidNativeSettings.Instance.ShowActions = EditorGUILayout.Foldout(AndroidNativeSettings.Instance.ShowActions, "More Actions");
        if (AndroidNativeSettings.Instance.ShowActions)
        {
            if (!IsFacebookInstalled)
            {
                GUI.enabled = false;
            }

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

            if (GUILayout.Button("Remove Facebook SDK", GUILayout.Width(160)))
            {
                bool result = EditorUtility.DisplayDialog(
                    "Removing Facebook SDK",
                    "Warning action can not be undone without reimporting the plugin",
                    "Remove",
                    "Cansel");

                if (result)
                {
                    FileStaticAPI.DeleteFolder(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + "facebook");
                    FileStaticAPI.DeleteFolder("Facebook");
                    FileStaticAPI.DeleteFolder("Extensions/GooglePlayCommon/Social/Facebook");
                    FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAndroidUseExample.cs");
                    FileStaticAPI.DeleteFile("Extensions/AndroidNative/xExample/Scripts/Social/FacebookAnalyticsExample.cs");
                }
            }

            GUI.enabled = true;

            if (GUILayout.Button("Open Manifest ", GUILayout.Width(160)))
            {
                UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal("Assets" + AN_ManifestManager.MANIFEST_FILE_PATH, 1);
            }

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


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();
            if (GUILayout.Button("Reset Settings", GUILayout.Width(160)))
            {
                SocialPlatfromSettingsEditor.ResetSettings();

                FileStaticAPI.DeleteFile("Extensions/AndroidNative/Resources/AndroidNativeSettings.asset");
                AndroidNativeSettings.Instance.ShowActions = true;
                Selection.activeObject = AndroidNativeSettings.Instance;

                return;
            }

            if (GUILayout.Button("Load Example Settings", GUILayout.Width(160)))
            {
                LoadExampleSettings();
            }

            EditorGUILayout.EndHorizontal();
        }
    }