// called on start private Dictionary <int, UnitNode> ParseJcatsXml(string filename, Material force) { Dictionary <int, UnitNode> topUnits = XmlReader.BuildTreeFromXML(filename); foreach (var key in topUnits.Keys) { CloneEntities_Rec(topUnits[key], force); } return(topUnits); }