I am currently running into the 4kbps limit and getting disconnected after a few minutes in my game. I’m trying to reduce bandwidth usage but I have not found a good way to display how many bytes I am sending/receiving. The stats functions on NetworkClient doesn’t seem to work, same with NetworkServer functions, they all return 0. Anyone had any luck with viewing bandwidth usage?
In short: Nope.
I tried external analysis tools, but getting the byte/s sent around between Unity clients and server seemed to be a more complex task than I expected.
I tried Microsoft Message Analyser, Wireshark and NetBalancer. I’ll need to get back to those tools later, it was not “just three clicks and tada” as I hoped
I am also having the same issues. I’ve used a stopwatch to time how long it takes to disconnect, then back calculated the bandwidth usage (ugh!).
Some thing I’ve found that were chewing up bandwidth were setting SyncVar/SyncList to the same value repeatedly.
The network panels of the profiler will tell you what operations you game is doing, but not the exact byte usage.
Ah thanks, that profiler is really helpful.
Why still don’t have a useful tool for tracking network traffic? it’s very importance to implement and optimize
bump
bump
Bump
At least, NetworkTransport provides functions to retrieve byte counts. For example, you can use these to calculate something such as server outgoing KBytes per second.
The solution is [here]( BenchmarkNet (Stress test for ENet, UNet, LiteNetLib, Lidgren, MiniUDP, Hazel, Photon and others) page-3#post-3373418), and [here]( BenchmarkNet (Stress test for ENet, UNet, LiteNetLib, Lidgren, MiniUDP, Hazel, Photon and others) page-3#post-3373165) is an example of the loopback packets capturing.
NetworkTransport.GetOutgoingFullBytesCount
public static int GetOutgoingFullBytesCount();
Returns
int Total data (user payload, protocol specific data, ip and udp headers) (in bytes) sent from start for all hosts.
Description
Returns how much raw data (in bytes) have been sent from start for all hosts (from NetworkTransport.Init call).
To determine the rate, sample this value periodically and divide the difference by the intervening time period.
Source: https://docs.unity3d.com/ScriptReference/Networking.NetworkTransport.GetOutgoingFullBytesCount.html
Is there any method that still works? I would like to know how much data my app is pulling from the server over time as I try to improve efficiency.
**NetworkTransport.**GetOutgoingFullBytesCount
is now obsolete and doesn’t work. Is there any other method that lets you know how much data your app is using up/down?