The Network Analyzer is a Unity Editor window which displays live bandwidth usage for a worker broken down by component type. This window can assist you with finding networking bottlenecks in your game.
To open the window, ensure the
Debug package is added to your project and select SpatialOS > Window > Network Analyzer from the Unity Editor menu.
Enter Play mode to start the data collection.
The window lists all SpatialOS components in your project and displays bandwidth usage for component update ops for each component. The data shown is collected over 60 frames and then normalized to show an approximate reading per second.
||This metric describes the number of update/command ops that this worker is receiving per second.|
||This metric describes the bandwidth used by updates/commands that this worker is receiving per second.|
||This metric describes the number of update/command ops that this worker is sending per second.|
||This metric describes the bandwidth used by updates/commands that this worker is sending per second.|
Note: Component updates are used for both component field changes as well as component events.
The Network Analyzer has multiple tabs for displaying networking metrics related to SpatialOS.
|Updates||Displays SpatialOS component update and event metrics.|
|Commands||Displays SpatialOS command request and response metrics.|
|World commands||Displays SpatialOS world command metrics, such as the EntityQuery and EntityCreate commands.|
The Network Analyzer only shows the bandwidth usage of a single worker at a time. If you have multiple workers running in the Editor, you can select which worker you wish to see data for by using the dropdown at the top of the window.
Component update loopback
The GDK for Unity has component update loopback turned on by default. This means that every update that is sent is also received by that worker. One effect of this is that you will see these loopbacked updates in the bandwidth inspector, which artificially inflates the incoming bandwidth usage. You should keep this in mind when interpreting the data presented in the Network Analyzer.