Added
- Added
AsNativeArray()read‑only accessor toNetworkList<T>(#3567) - Added serializer for
Pose(#3546) - Added
AttachableBehaviourhelper component to provide an alternate approach to parenting items without using theNetworkObjectparenting. (#3518) - Added
AttachableNodehelper component that is used byAttachableBehaviouras the target node for parenting. (#3518) - Added
ComponentControllerhelper component that can be used to synchronize the enabling and disabling of components and can be used in conjunction withAttachableBehaviour. (#3518) - Added
NetworkBehaviour.OnNetworkPreDespawnthat is invoked before running through the despawn sequence for theNetworkObjectand all NetworkBehaviour children of theNetworkObjectbeing despawned. (#3518) - Added methods
GetDefaultNetworkSettingsandGetDefaultPipelineConfigurationstoUnityTransport. These can be used to retrieve the default settings and pipeline stages that are used byUnityTransport. This is useful when providing a custom driver constructor throughUnityTransport.s_DriverConstructor, since it allows reusing or tuning the existing configuration instead of trying to recreate it. This means a transport with a custom driver can now easily benefit from most of the features ofUnityTransport, like integration with the Network Simulator and Network Profiler from the multiplayer tools package. (#3501) - Added mappings between
ClientIdandTransportId. (#3516) - Added
NetworkPrefabInstanceHandlerWithData<T>, a variant ofINetworkPrefabInstanceHandlerthat provides access to custom instantiation data directly within theInstantiate()method. (#3497)
Fixed
- Removed allocation to the heap in NetworkBehaviourUpdate. (#3573)
- Fixed issue where NetworkConfig.ConnectionData could cause the ConnectionRequestMessage to exceed the transport’s MTU size and would result in a buffer overflow error. (#3564)
- Fixed regression issue in v2.x where
NetworkObject.GetNetworkBehaviourAtOrderIndexwas converted from public to internal. (#3541) - Fixed ensuring OnValueChanged callback is still triggered on the authority when a collection changes and then reverts to the previous value in the same frame. (#3539)
- Fixed synchronizing the destroyGameObject parameter to clients for InScenePlaced network objects. (#3514)
- Fixed distributed authority related issue where enabling the
NetworkObject.DestroyWithScenewould cause errors when a destroying non-authority instances due to loading (single mode) or unloading scene events. (#3500) - Fixed an issue where
UnityTransportwould not accept single words as valid hostnames (notably “localhost”). (#3591) - Fixed issue where viewing a
NetworkBehaviourwith one or moreNetworkVariablefields could throw an exception if running a distributed authority network topology with a local (DAHost) host and viewed on the host when the host is not the authority of the associatedNetworkObject. (#3578) - Fixed issue when using a distributed authority network topology and viewing a
NetworkBehaviourwith one or moreNetworkVariablefields in the inspector view would not show editable fields. (#3578) - Fixed issue with unnecessary internal GC Allocations when using the
IReadOnlyListNetworkManager.ConnectedClientsIdswithin aforeachstatement by either replacing with aforloop or directly referencing theNetworkConnectionManager.ConnectedClientIds. (#3527)
Changed
- Marked
UnityTransport.ConnectionAddressData.ServerEndPointas obsolete. It can’t work when using hostnames as the server address, and its functionality can easily be replicated usingNetworkEndpoint.Parse. (#3591) - Optimized
NetworkList<T>indexer setter to skip operations when the new value equals the existing value, improving performance by avoiding unnecessary list events and network synchronization. (#3587)