Search code examples
unity-game-engineunity-networking

"Failed to send big message" in Unity networking


Unity suggests that custom synchronization of more complex objects can be done by overriding OnSerialize in your NetworkBehaviour. However, it seems NetworkWriter just gives up and errors out if you try and feed it more than about 1500 bytes.

In a lower-level context, I would expect this kind of size limitation on network messages and chunk them up myself. The HLAPI doesn't really expose the functionality necessary to do this in OnSerialize, though; how can I work around it?


Solution

  • Unity 5.2.3 added packet queueing for the ReliableFragmented QoS channel. Switching to this channel solved my problem.

    (726466) - Networking: Added support for HLAPI packet queuing on channels using the ReliableFragmented QoS.