How to check the traffic of network ?
Options
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 !
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 !
0
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 usingPhotonNetwork.networkingPeer.TrafficStatsEnabled = true;
. To access the TotalPacketsBytes you can usePhotonNetwork.networkingPeer.TrafficStatsOutgoing.TotalPacketBytes;
for the outgoing packets andPhotonNetwork.networkingPeer.TrafficStatsIncoming.TotalPacketBytes;
for the incoming packets.
In PUN 2 you can enable them by usingPhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsEnabled = true;
and access them by usingPhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsOutgoing.TotalPacketBytes
andPhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsIncoming.TotalPacketBytes
.0