yyl
2025-07-14 180b2a2b590814b0b0e247199175e19a3eb52c24
Main/Config/ConfigBase.cs
@@ -78,35 +78,39 @@
    public static void Init(string[] lines)
    {
        m_dic.Clear();
        if (isInit)
        {
            Debug.LogError("重复加载表格  类型 " + typeof(T).Name);
            return;
        }
        for (int i = 3; i < lines.Length; i++)
        {
            string line = lines[i];
            var index = line.IndexOf("\t");
            if (index == -1)
            {
                continue;
            }
                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();
                string strKey = line.Substring(0, index);
                T config = new T();
                U key = config.LoadKey(strKey);
                config.LoadConfig(line);
                config.OnConfigParseCompleted();
#if UNITY_EDITOR
            try
            {
                try
                {
#endif
                m_dic.Add(key, config);
                    m_dic.Add(key, config);
#if UNITY_EDITOR
            }
            catch (ArgumentException exception)
            {
                Debug.LogError(typeof(T).Name + " 重复的key " + key + " " + exception.Message);
            }
                }
                catch (ArgumentException exception)
                {
                    Debug.LogError(typeof(T).Name + " 重复的key " + key + " " + exception.Message);
                }
#endif
        }
            }
        foreach (var cfg in m_dic.Values)
        {