Skip to content

Commit ca577a6

Browse files
fix: Allow UDP/DTLS connections when working in the editor with WebGL (#2695)
* fix: Allow UDP/DTLS connections when working in the editor with WebGL * Add PR number to CHANGELOG entry
1 parent f59f5e6 commit ca577a6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
1414

1515
### Fixed
1616

17+
- Fixed issue where `UnityTransport` would attempt to establish WebSocket connections even if using UDP/DTLS Relay allocations when the build target was WebGL. This only applied to working in the editor since UDP/DTLS can't work in the browser. (#2695)
1718
- Fixed issue where a `NetworkBehaviour` component's `OnNetworkDespawn` was not being invoked on the host-server side for an in-scene placed `NetworkObject` when a scene was unloaded (during a scene transition) and the `NetworkBehaviour` component was positioned/ordered before the `NetworkObject` component. (#2685)
1819
- Fixed issue where `SpawnWithObservers` was not being honored when `NetworkConfig.EnableSceneManagement` was disabled. (#2682)
1920
- Fixed issue where `NetworkAnimator` was not internally tracking changes to layer weights which prevented proper layer weight synchronization back to the original layer weight value. (#2674)

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ public void CreateDriver(UnityTransport transport, out NetworkDriver driver,
15671567
}
15681568
else
15691569
{
1570-
#if UNITY_WEBGL
1570+
#if UNITY_WEBGL && !UNITY_EDITOR
15711571
Debug.LogWarning($"WebSockets were used even though they're not selected in NetworkManager. You should check {nameof(UseWebSockets)}', on the Unity Transport component, to silence this warning.");
15721572
driver = NetworkDriver.Create(new WebSocketNetworkInterface(), m_NetworkSettings);
15731573
#else

0 commit comments

Comments
 (0)