You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d5c1f54
Browse filesBrowse the repository at this point in the historyBrowse files
Restore each transport's own simulator settings once the CLI simulator, timeout and lag spike
are off, and keep a timeout on through a lag spike. Gate the simulator presets on Multiplayer
Tools 2.0. Prefer an exact NetworkManager name, keep the transport protocol and WebSocket path
when setting the address, refuse address changes on Relay, and listen on every interface for a
remote address. Let the server own objects in client-server.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/unity-cli-commands.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Drive Netcode for GameObjects from the command line, a CI job or an AI agent with the Unity CLI. The commands set up a NetworkManager and network prefabs, start and stop sessions, inspect connected clients and spawned objects, simulate poor network conditions, and sample network traffic.
4
4
5
-
The commands are available when the project has the `com.unity.pipeline` package (version 0.9.0-exp.1 or later). Without it, nothing extra is compiled. Run them against an open Editor as `unity command <group> <name> [arguments]`; `unity command --list` shows every command with its arguments.
5
+
The commands are available when the project has the `com.unity.pipeline` package (version 0.9.0-exp.1 or later). Without it, the commands aren't compiled. Run them against an open Editor as `unity command <group> <name> [arguments]`; `unity command --list` shows every command with its arguments.
6
6
7
7
## Typical workflow
8
8
@@ -55,13 +55,13 @@ To test with several players, use [Multiplayer Play Mode](https://docs.unity3d.c
55
55
56
56
### netcode.gameobjects.simulator
57
57
58
-
The simulator applies packet delay, jitter and loss to UnityTransport through its simulator pipeline stage, which is available in the Editor and development builds. Settings last for the Editor session and also apply to sessions started later.
58
+
The simulator applies packet delay, jitter and loss to UnityTransport through its simulator pipeline stage, which is available in the Editor and development builds. Settings last for the Editor session and also apply to sessions started later. Once the simulator, `timeout` and `lag_spike` are all off, the transport gets its own simulator settings back.
59
59
60
60
|**Command**|**Description**|
61
61
| :--- | :--- |
62
62
|`get`| The current simulated conditions. |
63
63
|`set`| Set a preset and/or packet delay, jitter and loss. |
64
-
|`list_presets`| Network condition presets. They come from the Multiplayer Tools package. |
64
+
|`list_presets`| Network condition presets. They come from the Multiplayer Tools package (2.0 or later). |
65
65
|`lag_spike`| Drop every packet for a short time. |
66
66
|`timeout`| Drop every packet until turned off, so connections time out. |
result.Notes.Add($"A server listens on every interface ({listenAddress}) so clients can reach it at {result.Address}. Change it with netcode.gameobjects.config set listen_address.");
notes.Add($"Created the default list at {defaultPath}. Attach it to your NetworkManager's Network Prefabs Lists (or let netcode.gameobjects create_network_manager do it).");
247
+
notes.Add($"{(dryRun?"Would create":"Created")} the default list at {defaultPath}. Attach it to your NetworkManager's Network Prefabs Lists (or let netcode.gameobjects create_network_manager do it).");
thrownewArgumentException($"{name} is a UnityTransport setting, and {manager.name} uses {manager.NetworkConfig.NetworkTransport?.GetType().Name??"no transport"}.");
notes.Add("Distributed authority needs a session service (use_cmb_service, e.g. through the Multiplayer Services SDK) or a distributed authority host.");
194
195
break;
195
-
case"client_connection_buffer_timeout" or "load_scene_timeout" or "time_resync_interval"when(int)value<1:
196
+
casenameof(NetworkConfig.ClientConnectionBufferTimeout) or nameof(NetworkConfig.LoadSceneTimeOut) or nameof(NetworkConfig.TimeResyncInterval)when(int)value<1:
196
197
thrownewArgumentException($"{name} must be at least 1.");
Add("warning","SEVERAL_NETWORKMANAGERS",null,$"{FindManagers().Count} NetworkManagers in the open scenes. Only one becomes NetworkManager.Singleton; keep one per session.");
230
+
Add("warning","SEVERAL_NETWORKMANAGERS",null,$"{all.Count} NetworkManagers in the open scenes. Only one becomes NetworkManager.Singleton; keep one per session.");
result.Notes.Add($"Distributed authority spawns are owned by the spawning client; owner {owner} is ignored. Transfer it afterwards with netcode.gameobjects change_owner.");
thrownewInvalidOperationException($"Ownership of {networkObject.name} didn't change{errors.Describe()} Check its ownership flags with netcode.gameobjects get_object.");
376
+
thrownewInvalidOperationException($"Ownership of {networkObject.name} didn't change{errors.Describe()}"+(manager.DistributedAuthorityMode
377
+
?" It may be locked, need a request, not be transferable or be session-owner only; check its ownership flags with netcode.gameobjects get_object."
0 commit comments