protected override Stream UnParse() { var s = new MemoryStream(); var bw = new BinaryWriter(s); bw.Write(this.version); if (this.commonA == null) { commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged); } this.commonA.UnParse(s); if (this.refList == null) { this.refList = new Gp8references(kRecommendedApiVersion, this.OnResourceChanged); } this.refList.UnParse(s); bw.Write(this.materialVariant); bw.Write(this.swatchGrouping); bw.Write(this.unk02); if (this.colors == null) { this.colors = new ColorList(this.OnResourceChanged); } this.colors.UnParse(s); return(s); }
void Parse(Stream s) { var br = new BinaryReader(s); this.version = br.ReadUInt32(); this.commonA = new CatalogCommon(kRecommendedApiVersion, this.OnResourceChanged, s); this.refList = new Gp8references(kRecommendedApiVersion, this.OnResourceChanged, s); this.materialVariant = br.ReadUInt32(); this.swatchGrouping = br.ReadUInt64(); this.unk02 = br.ReadUInt32(); this.colors = new ColorList(this.OnResourceChanged, s); }