Exemple #1
0
        private void ReadConfig()
        {
            _configPath = Application.dataPath + "/HTFramework/Editor/Utility/Config/Config.ini";

            INIParser ini = new INIParser();

            ini.Open(_configPath);
            _version       = ini.ReadValue("HTFrameworkEditor", "Version", "<None>");
            _supported     = ini.ReadValue("HTFrameworkEditor", "Supported", "<None>");
            _scripting     = ini.ReadValue("HTFrameworkEditor", "Scripting", "<None>");
            _api           = ini.ReadValue("HTFrameworkEditor", "Api", "<None>");
            _isShowOnStart = EditorPrefs.GetBool(EditorPrefsTable.AboutIsShowOnStart, true);
            ini.Close();
        }
Exemple #2
0
        /// <summary>
        /// 读取配置数据
        /// </summary>
        public static string ReadIniData(string section, string key, string defaultvalue, string path)
        {
            INIParser ini = new INIParser();

            ini.Open(path);
            string value = ini.ReadValue(section, key, defaultvalue);

            ini.Close();
            return(value);
        }