fix: Allow Relay hosts/servers on WebGL (#2321)
* fix: Allow Relay hosts/servers on WebGL * Add PR number to CHANGELOG entry
This commit is contained in:
Родитель
8ee79ab2a3
Коммит
d9ab3a7ffb
|
@ -11,10 +11,13 @@ Additional documentation and release notes are available at [Multiplayer Documen
|
|||
### Added
|
||||
|
||||
### Changed
|
||||
|
||||
- The default listen address of `UnityTransport` is now 0.0.0.0. (#2307)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed an issue in `UnityTransport` where an exception would be thrown if starting a Relay host/server on WebGL. This exception should only be thrown if using direct connections (where WebGL can't act as a host/server). (#2321)
|
||||
|
||||
## [1.2.0] - 2022-11-21
|
||||
|
||||
### Added
|
||||
|
|
|
@ -1471,7 +1471,7 @@ namespace Unity.Netcode.Transports.UTP
|
|||
heartbeatTimeoutMS: transport.m_HeartbeatTimeoutMS);
|
||||
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
if (NetworkManager.IsServer)
|
||||
if (NetworkManager.IsServer && m_ProtocolType != ProtocolType.RelayUnityTransport)
|
||||
{
|
||||
throw new Exception("WebGL as a server is not supported by Unity Transport, outside the Editor.");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче