Esempio n. 1
0
	private void Actions() {
		SocialPlatfromSettings.Instance.ShowActions = EditorGUILayout.Foldout(SocialPlatfromSettings.Instance.ShowActions, "More Actions");
		if(SocialPlatfromSettings.Instance.ShowActions) {
				
			if(!PluginsInstalationUtil.IsFacebookInstalled) {
				GUI.enabled = false;
			}	
				
			EditorGUILayout.BeginHorizontal();
			EditorGUILayout.Space();
				
			if(GUILayout.Button("Remove Facebook SDK",  GUILayout.Width(160))) {
				PluginsInstalationUtil.Remove_FB_SDK_WithDialog();
			}

			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();	
			EditorGUILayout.Space();


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

			if(GUILayout.Button("Remove",  GUILayout.Width(160))) {
				SA_RemoveTool.RemovePlugins();
			}
				
			EditorGUILayout.EndHorizontal();	
		}
	}
Esempio n. 2
0
    private void GeneralOptions()
    {
        if (!IsInstalled)
        {
            EditorGUILayout.HelpBox("Install Required ", MessageType.Error);

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();
            Color c = GUI.color;
            GUI.color = Color.cyan;
            if (GUILayout.Button("Install Plugin", GUILayout.Width(120)))
            {
                PluginsInstalationUtil.Android_InstallPlugin();
                PluginsInstalationUtil.IOS_InstallPlugin();
                FileStaticAPI.CreateFile(ios_install_mark_file);
                UpdateVersionInfo();
            }
            GUI.color = c;
            EditorGUILayout.EndHorizontal();
        }

        if (IsInstalled)
        {
            if (!IsUpToDate)
            {
                EditorGUILayout.HelpBox("Update Required \nResources version: " + DataVersion + " Plugin version: " + UltimateMobileSettings.VERSION_NUMBER, MessageType.Warning);


                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                Color c = GUI.color;
                GUI.color = Color.cyan;
                if (GUILayout.Button("Update to " + UltimateMobileSettings.VERSION_NUMBER, GUILayout.Width(250)))
                {
                    PluginsInstalationUtil.Android_UpdatePlugin();
                    PluginsInstalationUtil.IOS_UpdatePlugin();

                    UpdateVersionInfo();
                }

                GUI.color = c;
                EditorGUILayout.Space();
                EditorGUILayout.EndHorizontal();
            }
            else
            {
                EditorGUILayout.HelpBox("Ultimate Mobile Plugin v" + UltimateMobileSettings.VERSION_NUMBER + " is installed", MessageType.Info);


                Actions();
            }
        }


        EditorGUILayout.Space();
    }
    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();
        }
    }
    private void Actions()
    {
        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)
                {
                    PluginsInstalationUtil.Remove_FB_SDK();
                }
            }

            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();
            EditorGUILayout.Space();


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

            if (GUILayout.Button("Remove", GUILayout.Width(160)))
            {
                SA_RemoveTool.RemovePlugins();
            }

            EditorGUILayout.EndHorizontal();
        }
    }
Esempio n. 5
0
    private void GeneralOptions()
    {
        if (!IsFullVersion)
        {
            EditorGUILayout.HelpBox("Mobile Social Plugin v" + SocialPlatfromSettings.VERSION_NUMBER + " is installed", MessageType.Info);
            Actions();
            return;
        }

        if (!IsInstalled)
        {
            EditorGUILayout.HelpBox("Install Required ", MessageType.Error);

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();
            Color c = GUI.color;
            GUI.color = Color.cyan;
            if (GUILayout.Button("Install Plugin", GUILayout.Width(120)))
            {
                PluginsInstalationUtil.Android_InstallPlugin();
                PluginsInstalationUtil.IOS_InstallPlugin();
                UpdateVersionInfo();
            }
            GUI.color = c;
            EditorGUILayout.EndHorizontal();
        }

        if (IsInstalled)
        {
            if (!IsUpToDate)
            {
                EditorGUILayout.HelpBox("Update Required \nResources version: " + DataVersion + " Plugin version: " + SocialPlatfromSettings.VERSION_NUMBER, MessageType.Warning);

                if (Version <= 4.4f)
                {
                    EditorGUILayout.HelpBox("New version contains AndroidManifest.xml chnages, Please remove Assets/Plugins/Android/AndroidManifest.xml file before update or add manualy File Sharing Block from Assets/Plugins/StansAssets/Android/AndroidManifest.xml", MessageType.Warning);

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

                    if (GUILayout.Button("Remove AndroidManifest and Update to " + SocialPlatfromSettings.VERSION_NUMBER, GUILayout.Width(250)))
                    {
                        string file = "AndroidManifest.xml";
                        FileStaticAPI.DeleteFile(PluginsInstalationUtil.ANDROID_DESTANATION_PATH + file);

                        PluginsInstalationUtil.Android_UpdatePlugin();
                        UpdateVersionInfo();
                    }


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



                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                Color c = GUI.color;
                GUI.color = Color.cyan;
                if (GUILayout.Button("Update to " + SocialPlatfromSettings.VERSION_NUMBER, GUILayout.Width(250)))
                {
                    PluginsInstalationUtil.Android_InstallPlugin();
                    PluginsInstalationUtil.IOS_InstallPlugin();
                    UpdateVersionInfo();
                }

                GUI.color = c;
                EditorGUILayout.Space();
                EditorGUILayout.EndHorizontal();
            }
            else
            {
                EditorGUILayout.HelpBox("Mobile Social Plugin v" + SocialPlatfromSettings.VERSION_NUMBER + " is installed", MessageType.Info);
                Actions();
            }
        }

        EditorGUILayout.Space();
    }
Esempio n. 6
0
 public static void AN_Plugin_Update()
 {
     PluginsInstalationUtil.Android_UpdatePlugin();
     AndroidNativeSettingsEditor.UpdateAPIsInstalation();
 }