Skip to content

Commit 621d441

Browse files
authored
Merge branch 'develop-2.0.0' into chore/update-code-test-port
2 parents 4d11fef + be34997 commit 621d441

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

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

3232
### Changed
3333

34+
- Ensured that a useful error is thrown when attempting to build a dedicated server with Unity Transport that uses websockets. (#3336)
3435
- Changed root in-scene placed `NetworkObject` instances now will always have either the `Distributable` permission set unless the `SessionOwner` permission is set. (#3305)
3536
- Changed the `DestroyObject` message to reduce the serialized message size and remove the unnecessary message field. (#3304)
3637
- Changed the `NetworkTimeSystem.Sync` method to use half RTT to calculate the desired local time offset as opposed to the full RTT. (#3212)

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,21 @@ public void CreateDriver(UnityTransport transport, out NetworkDriver driver,
16681668
}
16691669
#endif
16701670

1671+
#if UNITY_SERVER
1672+
if (m_ProtocolType == ProtocolType.RelayUnityTransport)
1673+
{
1674+
if (m_UseWebSockets)
1675+
{
1676+
Debug.LogError("Transport is configured to use Websockets, but websockets are not available on server builds. Ensure that the \"Use WebSockets\" checkbox is checked under \"Unity Transport\" component.");
1677+
}
1678+
1679+
if (m_RelayServerData.IsWebSocket != 0)
1680+
{
1681+
Debug.LogError("Relay server data indicates usage of WebSockets, but websockets are not available on server builds. Be sure to use \"dtls\" or \"udp\" as the connection type when creating the server data");
1682+
}
1683+
}
1684+
#endif
1685+
16711686
#if UTP_TRANSPORT_2_0_ABOVE
16721687
if (m_UseEncryption)
16731688
{

0 commit comments

Comments
 (0)