Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow UDP/DTLS connections when working in the editor with WebGL #2695

Merged
merged 2 commits into from Sep 7, 2023

Conversation

simon-lemay-unity
Copy link
Contributor

Our check for #if UNITY_WEBGL that forced the usage of the WebSocketNetworkInterface would also apply in the editor. But in the editor, it's fine to use UDP/DTLS even if your build target is WebGL. It's not particularly useful to do that, but it could be used for debugging purposes (e.g. trying to assess whether an issue is caused by WebSockets or not). Enabling that workflow only required modifying the check to also verify we're not in the editor.

Changelog

  • 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.

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

@simon-lemay-unity simon-lemay-unity requested a review from a team as a code owner September 7, 2023 19:45
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@simon-lemay-unity simon-lemay-unity enabled auto-merge (squash) September 7, 2023 20:02
@simon-lemay-unity simon-lemay-unity merged commit ca577a6 into develop Sep 7, 2023
23 checks passed
@simon-lemay-unity simon-lemay-unity deleted the fix/webgl-udp-dtls-relay branch September 7, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants