public void ReadFromStream(Stream stream) { BinaryReader br = new BinaryReader(stream); Type = (YkdResourceViewportType)br.ReadInt32(); Index = br.ReadInt32(); Dummy2 = br.Check(r => r.ReadInt32(), 0); Dummy3 = br.Check(r => r.ReadInt32(), 0); Name = stream.ReadFixedSizeString(NameSize, YkdFile.NamesEncoding); Viewport = YkdResourceViewport.ReadFromStream(Type, stream); }