Пример #1
0
        public static void PrepareToolPaths()
        {
            string str = EditorPrefs.GetString("TizenSdkRoot");

            while (string.IsNullOrEmpty(str) || !TizenSdkRoot.IsSdkDir(str))
            {
                str = TizenSdkRoot.Browse(str);
            }
            EditorPrefs.SetString("TizenSdkRoot", str);
            sdk_tools = Path.Combine(str, "tools");
            sdb_exe   = "sdb";
            sdb_exe   = Path.Combine(sdk_tools, sdb_exe);
            if (Application.platform == RuntimePlatform.WindowsEditor)
            {
                sdb_exe = sdb_exe + ".exe";
            }
        }
        public void ShowExternalApplications()
        {
            GUIStyle followingStyle = "MiniPopup";

            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            EditorGUILayout.PrefixLabel("Tizen Studio Location", followingStyle);
            string     text    = !string.IsNullOrEmpty(this.m_TizenSdkPath) ? this.m_TizenSdkPath : "Browse...";
            GUIContent content = new GUIContent(text);

            if (EditorGUI.ButtonMouseDown(GUILayoutUtility.GetRect(GUIContent.none, followingStyle), content, FocusType.Passive, followingStyle))
            {
                string str2 = TizenSdkRoot.Browse(this.m_TizenSdkPath);
                if (!string.IsNullOrEmpty(str2))
                {
                    this.m_TizenSdkPath = str2;
                    this.WritePreferences();
                    this.ReadPreferences();
                }
            }
            GUILayout.EndHorizontal();
        }