I typically write explicit ToBytes/FromBytes* methods on classes I want to transfer. This is pretty fast, and allows you to choose exactly what state information needs to be transferred (any automated serialiser will take everything, and will have to use reflection to find the properties to read) and any compression/transformation that might be useful (for example transferring only 6 entries from a 3×3 transform matrix). However, obviously it requires you to write those methods and keep them up to date.
(*: Actually I tend to use the ByteBuilder and add parameters, using my socket library. But the principle is the same.)
This is not a solution for everyone (particularly if you have lots of pre-existing classes that you want to be transferrable) but it can be a good approach.
Edit: obligatory self-promotion for
my sockets library[
^].