private Dictionary<int,T> LoadConfig<T>(string fileName) where T : class,new()
{
Dictionary<int, T> dic = new Dictionary<int, T>();
TextAsset bossCfgInfo = Resources.Load<TextAsset>("Config/" + fileName);
//新建xml文档对象
XmlDocument document = new XmlDocument();
//把字符串加载到对象中
document.LoadXml(bossCfgInfo.text);
//获取根节点
XmlNode rootNode = document.SelectSingleNode(
Unity3D-动态读取配置文件,加载游戏对象
最新推荐文章于 2025-06-26 13:46:58 发布