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
feat: Dynamically size the UnityTransport send queues [MTT-2816] (#2212)
* Make BatchedSendQueue dynamically-sized
* Remove MaxSendQueueSize as a serialized field
* Add CHANGELOG entries
* Add PR number to CHANGELOG entries
* Add extra tests for BatchedSendQueue
* Address some PR comments
* Keep the standards checks happy
* Address a review comment + some cleanup
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
15
15
16
16
### Changed
17
17
18
+
- The send queues of `UnityTransport` are now dynamically-sized. This means that there shouldn't be any need anymore to tweak the 'Max Send Queue Size' value. In fact, this field is now removed from the inspector and will not be serialized anymore. It is still possible to set it manually using the `MaxSendQueueSize` property, but it is not recommended to do so aside from some specific needs (e.g. limiting the amount of memory used by the send queues in very constrained environments). (#2212)
19
+
- As a consequence of the above change, the `UnityTransport.InitialMaxSendQueueSize` field is now deprecated. There is no default value anymore since send queues are dynamically-sized. (#2212)
18
20
- The debug simulator in `UnityTransport` is now non-deterministic. Its random number generator used to be seeded with a constant value, leading to the same pattern of packet drops, delays, and jitter in every run. (#2196)
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs
+30-13Lines changed: 30 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -137,8 +137,13 @@ private enum State
137
137
/// <summary>
138
138
/// The default maximum send queue size
139
139
/// </summary>
140
+
[Obsolete("MaxSendQueueSize is now determined dynamically (can still be set programmatically using the MaxSendQueueSize property). This initial value is not used anymore.",false)]
[Tooltip("The maximum size in bytes of the transport send queue. The send queue accumulates messages for batching and stores messages when other internal send queues are full. If you routinely observe an error about too many in-flight packets, try increasing this.")]
0 commit comments