Esempio n. 1
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();
				UpdateVersionInfo();
			}
			GUI.color = c;
			EditorGUILayout.EndHorizontal();
		}
		
		if(IsInstalled) {
			if(!IsUpToDate) {
				EditorGUILayout.HelpBox("Update Required \nResources version: " + SA_VersionsManager.MSP_StringVersionId + " Plugin version: " + SocialPlatfromSettings.VERSION_NUMBER, MessageType.Warning);

				
				
				
				EditorGUILayout.BeginHorizontal();
				EditorGUILayout.Space();
				Color c = GUI.color;
				GUI.color = Color.cyan;


				if(CurrentMagorVersion != SA_VersionsManager.MSP_MagorVersion) {
					if(GUILayout.Button("How to update",  GUILayout.Width(250))) {
						Application.OpenURL("https://goo.gl/ZI66Ub");
					}
				} else {
					if(GUILayout.Button("Upgrade Resources",  GUILayout.Width(250))) {
						PluginsInstalationUtil.Android_InstallPlugin();
						PluginsInstalationUtil.IOS_InstallPlugin();
						UpdateVersionInfo();
					}
				}

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

		EditorGUILayout.Space();
		
	}
    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();
                UpdateVersionInfo();
            }
            GUI.color = c;
            EditorGUILayout.EndHorizontal();
        }

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



                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                Color c = GUI.color;
                GUI.color = Color.cyan;

                Debug.Log(SA_VersionsManager.MNP_Version);
                if (CurrentVersion != SA_VersionsManager.MNP_Version)
                {
                    if (GUILayout.Button("Upgrade Resources", GUILayout.Width(250)))
                    {
                        PluginsInstalationUtil.Android_InstallPlugin();
                        PluginsInstalationUtil.IOS_InstallPlugin();
                        UpdateVersionInfo();
                    }
                }

                GUI.color = c;
                EditorGUILayout.Space();
                EditorGUILayout.EndHorizontal();

                EditorGUILayout.Space();
            }
            else
            {
                EditorGUILayout.HelpBox("Mobile Native Pop Up v" + MNP_PlatformSettings.VERSION_NUMBER + " is installed", MessageType.Info);
            }
        }

        EditorGUILayout.Space();
    }
Esempio n. 3
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();
        GoogleMobileAdSettings.Instance.ShowActions = EditorGUILayout.Foldout(GoogleMobileAdSettings.Instance.ShowActions, "More Actions");
        if (GoogleMobileAdSettings.Instance.ShowActions)
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();

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

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

            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_InstallPlugin();
                PluginsInstalationUtil.IOS_InstallPlugin();
                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
    public static void UpdatePluginVersion()
    {
        PluginsInstalationUtil.Android_InstallPlugin();
        PluginsInstalationUtil.IOS_InstallPlugin();
        UpdateGoogleAdIOSAPI();


        FileStaticAPI.Write(version_info_file, UltimateMobileSettings.VERSION_NUMBER);
        AndroidNativeSettingsEditor.UpdateVersionInfo();
        GoogleMobileAdSettingsEditor.UpdateVersionInfo();
    }
Esempio n. 6
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();
    }