| | |
| | | }
|
| | |
|
| | | for (int i = 3; i < lines.Length; i++)
|
| | | {
|
| | | string line = lines[i];
|
| | | var index = line.IndexOf("\t");
|
| | | if (index == -1)
|
| | | {
|
| | | string line = lines[i];
|
| | | var index = line.IndexOf("\t");
|
| | | if (index == -1)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | string strKey = line.Substring(0, index);
|
| | | T config = new T();
|
| | | U key = config.LoadKey(strKey);
|
| | | config.LoadConfig(line);
|
| | | config.OnConfigParseCompleted();
|
| | | #if UNITY_EDITOR
|
| | | try
|
| | | {
|
| | | #endif
|
| | | m_dic.Add(key, config);
|
| | | #if UNITY_EDITOR
|
| | | }
|
| | | catch (ArgumentException exception)
|
| | | {
|
| | | Debug.LogError(typeof(T).Name + " 重复的key " + key + " " + exception.Message);
|
| | | }
|
| | | #endif
|
| | | continue;
|
| | | }
|
| | |
|
| | | foreach (var cfg in m_dic.Values)
|
| | | {
|
| | | cfg.AllConfigLoadFinish();
|
| | | string strKey = line.Substring(0, index);
|
| | | T config = new T();
|
| | | U key = config.LoadKey(strKey);
|
| | | config.LoadConfig(line);
|
| | | config.OnConfigParseCompleted();
|
| | | #if UNITY_EDITOR
|
| | | try
|
| | | {
|
| | | #endif
|
| | | m_dic.Add(key, config);
|
| | | #if UNITY_EDITOR
|
| | | }
|
| | | catch (ArgumentException exception)
|
| | | {
|
| | | Debug.LogError(typeof(T).Name + " 重复的key " + key + " " + exception.Message);
|
| | | }
|
| | | #endif
|
| | | }
|
| | |
|
| | | |
| | | // foreach (var cfg in m_dic.Values)
|
| | | // {
|
| | | // cfg.AllConfigLoadFinish();
|
| | | // }
|
| | |
|
| | | isInit = true;
|
| | | }
|
| | |
|