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();
                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();
    }