What Kind Of Types Can You Send?

I hate the default unity networking because I can only send a very limited selection of data types. If I use Photon will I be able to send things like a transform or monobehaviour reference across a network?


  • Kaiserludi
    Yes, but you will need to specify via Photons custom type callback interface, how Photon schould (de-)serialize them.
  • Tobias
    Using the limited data type set usually makes them leaner to send.
    You can support more types in PUN too. Just have a look at CustomTypes.cs and extend it at will.
    Keep in mind: Any custom type added requires the bytes you serialize for it plus 4 extra bytes per instance. If you could send a plain byte instead, this is considerable overhead. In worst case, you send this several times per second and player (these extra bytes sum up quickly).