|
| 1 | +--- |
| 2 | +id: netscenevis |
| 3 | +title: Network Scene Visualization |
| 4 | +--- |
| 5 | + |
| 6 | +Network Scene Visualization (NetSceneVis) is a powerful, user-friendly tool included in the Multiplayer Tools package to help you visualize and debug network communication on a per-object basis in the Unity Editor Scene View of your project with visualizations such as mesh shading and text overlay. |
| 7 | + |
| 8 | +The NetSceneVis tool listens to network messages about the game state to visually display bandwidth and ownership on a per-object basis in the Unity Editor. The visualizations are updated in real-time as the network messages are sent and received, showing the game state synchronization across the network. |
| 9 | + |
| 10 | +This tool can help you optimize and debug your network code to ensure that your game runs smoothly for all players. |
| 11 | + |
| 12 | +## Requirements |
| 13 | +- Unity 2023.2.0a11 or higher |
| 14 | +- Multiplayer Tools package 2.0.0-pre.2 or higher, see [Install the Multiplayer Tools Package](./install-tools.md) |
| 15 | + |
| 16 | +## Using Network Scene Visualization |
| 17 | + |
| 18 | +After [installing the Multiplayer Tools package](#requirements), the Network Visualization toolbar is available in the scene view of the Unity Editor. This toolbar includes the options to visualize networking information per-object of your game. |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | +Hovering over each option under **Bandwidth**, **Ownership**, and **Settings** reveals detailed tooltips for each option. |
| 23 | + |
| 24 | +### Bandwidth |
| 25 | + |
| 26 | +Selecting **Bandwidth Mode** displays the bandwidth usage of each object. |
| 27 | + |
| 28 | +| Option | Description | |
| 29 | +|---|---| |
| 30 | +| *Type* | Filter the bandwidth by type: network variables (**NetVars**), **RPCs**, or **All**. **All** includes spawn, despawn, ownership change, network variables, and RPCs. | |
| 31 | +| *Direction* | Filter bandwith by direction: **Sent**, **Received**, or **Sent and Received**. | |
| 32 | +| *Smoothing* | Smooth the bandwidth data over time. Higher values improve readability by filtering out sudden data changes. This option is disabled when paused. | |
| 33 | +| *Text Overlay* | Visualize the per-object bandwith with text labels. | |
| 34 | +| *Shading* > *Auto Scale* | Automatically scales the mesh shading visualization to the current maximum per-object bandwidth of any object in the scene. The minimum bandwidth will always be 0. | |
| 35 | +| *Shading* > *Min/Max Bandwidth Bar* | When **Auto Scale** is unchecked, you can manually choose the min and max bandwidth values. The color bar can be changed between 4 options. The color bar can be changed when **Auto Scale** is checked or unchecked. | |
| 36 | + |
| 37 | +### Ownership |
| 38 | + |
| 39 | +Selecting **Ownership Mode** displays the ownership of each object, either by the server, host, or by a specific client. |
| 40 | + |
| 41 | +| Option | Description | |
| 42 | +|---|---| |
| 43 | +| *Text Overlay* | Visualize the per-object ownership with text labels. | |
| 44 | +| *Shading* | Visualize the per-object ownership with a colored overlay. | |
| 45 | + |
| 46 | +### Settings |
| 47 | + |
| 48 | +These settings are only available when **MeshShading** is enabled. |
| 49 | + |
| 50 | +You can toggle the **Outline** option to display a black outline around networked objects to improve visibility in the scene and distinguish between overlapping networked objects. |
| 51 | + |
| 52 | +The **Saturation (%)** controls the saturation of non-networked objects so networked objects can stand out more. The scale goes from 0 as grayscale to 100 for full color. |
0 commit comments