private static void WriteMesh(MeshDef def, string path) { using (Stream s = File.OpenWrite(path)) { MeshFile.Save(s, def); } }