private byte[] writeObjects(UnityBinaryWriter writer) { writer.WriteInt(Objects.Length); UnityBinaryWriter objectwriter = new UnityBinaryWriter(); for (int i = 0; i < Objects.Length; i++) { // objects alignment is 8byte writer.Align(4); writer.WriteLong(Objects[i].PathID); objectwriter.Align(8); writer.WriteInt(objectwriter.Position); writer.WriteInt(Objects[i].Data.Length); writer.WriteInt(Objects[i].TypeID); objectwriter.WriteBytes(Objects[i].Data); } // return body return(objectwriter.ToBytes()); }
public void Write(UnityBinaryWriter writer) { writer.WriteInt(Index); writer.Align(4); writer.WriteLong(Identifier); }