Fusion: OnReliableDataReceived does not set offsets correctly?

Options
WARdd
WARdd ✭✭

I'm trying to send over large customization files over the network, as per advise I went with SendReliableDataToPlayer to achieve this. Now I'm trying to send a block of 1575 bytes, which usually arrives in 2 chunks, for example one of 1128 and 447.

I was under the impression that in the second block the received ArraySegment<byte> would have an offset value set to 1128 to indicate it is part of the same block, but it seems this offset value is always 0. Am I misunderstanding something or this a bug?

I can work around this for now by just storing the offset value locally and resetting it once a data block is complete. Still this is a bit awkward to implement and I'm a bit worried about 2 different data getting mixed up if the different chunks arrive out of order. Does fusion prevent that from happening by default?

Answers