/// <summary> /// 获取拷贝资源信息。 /// </summary> /// <returns></returns> public static List <CopyResourcesInfo> LoadCopyResourcesInfo() { var path = string.Concat(GetFolderPath("ResourceDef"), "\\ForCopy.xml"); //LogDebug(path); var xml = XMLParser.LoadXML(Utils.LoadFile(path)); if (xml == null) { //EditorUtility.DisplayDialog("Error", "Load Copy Resources Info Error.", "ok"); return(null); } var result = new List <CopyResourcesInfo>(); foreach (SecurityElement item in xml.Children) { var info = new CopyResourcesInfo(); info.check = true; info.targetPath = (item.Children[0] as SecurityElement).Text; info.sourcePath = (item.Children[1] as SecurityElement).Text; info.extention = (item.Children[2] as SecurityElement).Text; result.Add(info); } return(result); }
/// <summary> /// 获取拷贝资源信息。 /// </summary> /// <returns></returns> public static List<CopyResourcesInfo> LoadCopyResourcesInfo() { var path = string.Concat(GetFolderPath("ResourceDef"), "\\ForCopy.xml"); //LogDebug(path); var xml = XMLParser.LoadXML(Utils.LoadFile(path)); if (xml == null) { //EditorUtility.DisplayDialog("Error", "Load Copy Resources Info Error.", "ok"); return null; } var result = new List<CopyResourcesInfo>(); foreach (SecurityElement item in xml.Children) { var info = new CopyResourcesInfo(); info.check = true; info.targetPath = (item.Children[0] as SecurityElement).Text; info.sourcePath = (item.Children[1] as SecurityElement).Text; info.extention = (item.Children[2] as SecurityElement).Text; result.Add(info); } return result; }