/// <summary> /// 写入配置数据 /// </summary> public static void WriteIniData(string section, string key, string value, string path) { INIParser ini = new INIParser(); ini.Open(path); ini.WriteValue(section, key, value); ini.Close(); }
/// <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); }
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(); }