Skip to content

Commit d9ab3a7

Browse files
fix: Allow Relay hosts/servers on WebGL (#2321)
* fix: Allow Relay hosts/servers on WebGL * Add PR number to CHANGELOG entry
1 parent 8ee79ab commit d9ab3a7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ Additional documentation and release notes are available at [Multiplayer Documen
1111
### Added
1212

1313
### Changed
14+
1415
- The default listen address of `UnityTransport` is now 0.0.0.0. (#2307)
1516

1617
### Fixed
1718

19+
- 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)
20+
1821
## [1.2.0] - 2022-11-21
1922

2023
### Added

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ public void CreateDriver(UnityTransport transport, out NetworkDriver driver,
14711471
heartbeatTimeoutMS: transport.m_HeartbeatTimeoutMS);
14721472

14731473
#if UNITY_WEBGL && !UNITY_EDITOR
1474-
if (NetworkManager.IsServer)
1474+
if (NetworkManager.IsServer && m_ProtocolType != ProtocolType.RelayUnityTransport)
14751475
{
14761476
throw new Exception("WebGL as a server is not supported by Unity Transport, outside the Editor.");
14771477
}

0 commit comments

Comments
 (0)