private static T DeserializeObject <T>(string path) { var bytes = File.ReadAllBytes(path); var obj = BinaryIO.Deserialize <T>(bytes); return(obj); }
public void SaveToDisk(string content_path) { var bytes = BinaryIO.Serialize(this); File.WriteAllBytes(Path.Combine(content_path, this.Name + ".pak"), bytes); }