The Unity Transport
com.unity.transport package respository adds multiplayer and network features to your project. See the following changelog for new features, updates, fixes, and upgrade information.
- Added a way to obtain
RelayHMACKeystructures from byte arrays using the static
- Added a new constructor for
RelayServerDatathat is now provided with argument types that better match those available in the models returned by the Relay SDK. Note: We also updated the "RelayPing" sample to use the new constructor.
- Added new constructors for
RelayServerDatathat are provided with argument types that better match those available in the models returned by the Relay SDK. Note: We also updated the "RelayPing" sample to use the new constructor.
NetworkSettingsto include a
IsCreatedproperty that can be used to check if it's been disposed of or not.
- Added new versions of
NetworkSettins.WithSecureServerParameters. These new versions take strings as parameters instead of references to fixed strings. The older versions are still available and fully supported.
- Added a new version of
NetworkSettings.WithSecureClientParametersthat only takes the server name as a parameter. You can use this when the server uses certificates from a recognized CA (certificate authority).
- Added a warning that triggers if binding to a port where another application is listening. The binding operation still succeeds in that scenario, but this will fail in Unity Transport 2.0 (which disables address reuse on the sockets used by the default interface).
- Deprecated the constructor for
RelayServerDatathat was taking strings for the allocation ID, connection data, and key. Use the new constructor (see above) or the existing lower-level constructor instead.
- Deprecated the
RelayServerData.ComputeNewNoncemethod. You can provide a custom nonce using the "low level" constructor of
RelayServerData. The new constructor selects a new nonce automatically.
- Added the option to call
Connectwithout an endpoint if you’re using Relay (the endpoint would be ignored anyway). This extension to
NetworkDriveris provided in the
- Fixed a possible stack overflow error that occurs if the
sendqueue parameters are configured with very large values (>15,000).
- Prevented an issue where a warning about having too many pipeline updates would be spammed after a connection was closed.
- Fixed an issue where a duplicated reliable packet wouldn't be processed correctly, which could possibly lead to the entire reliable pipeline stage stalling (not being able to send new packets).
- Fixed an issue where pipeline updates would be run too many times, which would waste CPU and could lead to the warning about having too many pipeline updates being erroneously logged.
- Fixed issues with
ReliableSequencePipelineStagethat would, in rare circumstances, lead to failure to deliver a reliable packet.
- Fixed a lag issue with iOS when switching app from being in background to resuming use.
DataStreamReadercan now be passed to another job without triggering the job safety system.
GetRelayConnectionStatusmethod has been added to
NetworkDriverto query the status of the connection to the Relay server.
NetworkSettings.WithDataStreamParametersis now obsolete. The functionality still works and will remain supported for version 1.X of the package, but will be removed in version 2.0. The reason for the removal is that in 2.0 the data stream size is always dynamically-sized to avoid out-of-memory errors.
NetworkSettings.WithPipelineParametersis now obsolete. The functionality still works and will remain supported for version 1.X of the package, but will be removed in version 2.0, where pipeline buffer sizing is handled internally.
- Updated Burst dependency to 1.6.6.
- Updated Collections dependency to 1.2.4.
- Updated Mathematics dependency to 1.2.6.
BeginSendwould not return an error if called on a closed connection before the next
- Fixed a warning if using the default maximum payload size with DTLS.
- Removed an error log when receiving messages on a closed DTLS connection (this scenario is common if there were in-flight messages at the moment of disconnection).
- Fix broken link in package documentation.
- Changed version to 1.0.0.