How to check the traffic of network ?

Hello
All
i'd like to check the traffic of the network between 2 players on online mode
my game depend on
Particles - Animation - Audio
nothing more
so there is any tool to check the traffic data between two connectors
to know from where problem of lagging come from
values - particles - animation
whatever
Thanks !

Comments

  • Hi @MostafaYahia,

    one way is to use the Dashboard. There you have different charts displaying different values. One of the charts is about the traffic. Please note that this one is not updated in realtime, it takes a few moments to update (don't know how long exactly).

    Ingame you can check out the TrafficStats. In PUN Classic you can enable them by using PhotonNetwork.networkingPeer.TrafficStatsEnabled = true;. To access the TotalPacketsBytes you can use PhotonNetwork.networkingPeer.TrafficStatsOutgoing.TotalPacketBytes; for the outgoing packets and PhotonNetwork.networkingPeer.TrafficStatsIncoming.TotalPacketBytes; for the incoming packets.

    In PUN 2 you can enable them by using PhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsEnabled = true; and access them by using PhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsOutgoing.TotalPacketBytes and PhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsIncoming.TotalPacketBytes.