OnPhotonSerialize and number of messages per second

Options
Trying to wrap my head around how the messages per second is calculated. As far as we understand since OnPhotonSerialize is called 10 times a second it would mean every object which implements that methods adds 10 messages per second. For our game the Master client spawns a bunch of AI enemies which then synchronize with the other connected players. If we have 50 enemies would this mean the enemies would end up sending 500 messages per second ? Would it be possible for us to control how many messages actually get sent ? If we do not write any data to the stream in OnPhotonSerialize method would a message not get sent ?

Comments

  • OneManArmy
    OneManArmy ✭✭✭
    edited May 2017
    Options
    You can change sendRateOnSerialize:
    PhotonNetwork.sendRateOnSerialize = 10;

    Enemy AI's synced via OnPhotonSerialize will not impact number of messages (only bandwidth).
    You can sync AI enemies with RPCs and update with any interval.