public void WriteBinary(ArkArchive archive) { archive.WriteFloat(X); archive.WriteFloat(Y); archive.WriteFloat(Z); archive.WriteByte(UnkByte); archive.WriteFloat(UnkFloat); archive.WriteInt(nameTableSize); ArkArchive nameArchive = archive.Slice(nameTableSize); nameArchive.WriteInt(3); nameArchive.WriteInt(nameTable.Count); nameTable.ForEach(nameArchive.WriteString); nameArchive.WriteInt(ZoneVolumes.Count); ZoneVolumes.ForEach(nameArchive.WriteName); archive.WriteInt(objectsSize); ArkArchive objectArchive = archive.Slice(objectsSize); objectArchive.WriteInt(Objects.Count); int currentOffset = propertiesStart; foreach (GameObject gameObject in Objects) { currentOffset = gameObject.WriteBinary(objectArchive, currentOffset); } objectArchive.SetNameTable(nameTable, 0, true); foreach (GameObject gameObject in Objects) { gameObject.WriteProperties(objectArchive, 0); } archive.WriteInt(UnkInt1); archive.WriteInt(ClassIndex); }