/// <summary> /// Format: [0+2N]id [1+2N]name /// </summary> /// <returns></returns> public static List <string> GetMapTemplateNameList() { List <string> mapTemplateNameList = new List <string>(); ForEachTemplateDirectory(fullName => { var id = System.IO.Path.GetFileName(fullName); var json = XYFile.LoadJson <JsonMapTemplate>(fullName + @"\" + configFileName); mapTemplateNameList.AddRange(new[] { id, json.name }); return(false); }); return(mapTemplateNameList); }
public static JsonMapTemplate GetMapTemplateData(string name) { var path = XYPath.Dir.SourceTemplate + $@"\{name}\{configFileName}"; return(XYFile.LoadJson <JsonMapTemplate>(path)); }