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
This commit is contained in:
Simon Lemay 2023-09-07 17:08:23 -04:00 коммит произвёл GitHub
Родитель f59f5e60fa
Коммит ca577a6d3b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -14,6 +14,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
### Fixed
- 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)
- 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)
- Fixed issue where `SpawnWithObservers` was not being honored when `NetworkConfig.EnableSceneManagement` was disabled. (#2682)
- 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)

Просмотреть файл

@ -1567,7 +1567,7 @@ namespace Unity.Netcode.Transports.UTP
}
else
{
#if UNITY_WEBGL
#if UNITY_WEBGL && !UNITY_EDITOR
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.");
driver = NetworkDriver.Create(new WebSocketNetworkInterface(), m_NetworkSettings);
#else