private TConfig[] LoadCfg() { string path = ConfigMgr.CfgPath + "/" + GetName() + ".csv"; Excel excel = new Excel(2); if (!excel.Load(path)) { return(null); } ICfgDecoder decoder = ConfigMgr.GetDecoder(GetName()); if (decoder == null) { m_logger.LogError(GetName() + "的Decoder没有找到!", "BaseDao_UseXML.LoadCfg"); return(null); } if (!decoder.Decode(excel)) { return(null); } BaseCfgData <TConfig> data = decoder.Data as BaseCfgData <TConfig>; if (data == null) { m_logger.LogError("data == null, dao = " + this, "BaseDao_UseXML.LoadCfg"); return(null); } return(data.Data); }
private TConfig[] LoadCfg() { //BaseCfgData<TConfig> cfgData = Resources.Load<BaseCfgData<TConfig>>("Config/" + GetName()); BaseCfgData <TConfig> cfgData = ResourceManger.LoadConfig(GetName()) as BaseCfgData <TConfig>; if (cfgData == null) { return(null); } return(cfgData.Data); }