public static RoadThemePack Deserialize(string filePath) { XmlSerializer xmlSerializer = new XmlSerializer(typeof(RoadThemePack)); RoadThemePack result; try { using (StreamReader streamReader = new StreamReader(filePath)) { RoadThemePack roadThemePack = xmlSerializer.Deserialize(streamReader) as RoadThemePack; result = roadThemePack; } } catch (Exception ex) { Debug.Log(string.Format("[{0}]: Error Parsing {1}: {2}", filePath, ex.Message.ToString())); result = null; } return(result); }