feat: Add support for WebSocket path in UnityTransport#3901
Merged
michalChrobot merged 2 commits intodevelop-2.0.0from Mar 17, 2026
Merged
feat: Add support for WebSocket path in UnityTransport#3901michalChrobot merged 2 commits intodevelop-2.0.0from
michalChrobot merged 2 commits intodevelop-2.0.0from
Conversation
EmandM
approved these changes
Mar 16, 2026
Member
EmandM
left a comment
There was a problem hiding this comment.
I have a PR pending to stop testing PRs on trunk, once that lands the tests should pass and this should be good to go!
Thanks for the quick turnaround!
Member
|
FYI the error should be resolved after #3902 lands (as this is trunk related) Anyway, as this is not your PR issue I'm going to merge this already (it was approved + you enabled auto-merge) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
For a few versions now UTP has supported setting the URL path that's going to be used for WebSockets (e.g. if you want to connect to
wss://foobar.com/somewhereinstead of justwss://foobar.com). That capability has not been exposed to NGO however. It was possible to still get access to this setting by using a custom driver constructor, but that's a bit of a heavy solution for such a simple thing.This PR remedies that by allowing users to directly set the URL path on the
UnityTransportcomponent. This is done through a new field inConnectionDatathat only shows up in the inspector if using WebSockets. This is just then routed to the appropriate setting in UTP.This was suggested by a user here, showing that there is some interest for this feature.
Jira ticket
None. Didn't want to bother creating one.
Changelog
WebSocketPathfield toUnityTransport.ConnectionData(which also shows up in the inspector if "Use WebSockets" is checked) that controls the path clients will connect to and servers/hosts will listen on when using WebSockets.Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?Backports
No. Couldn't backport even if I wanted to since WebSockets are UTP 2.X+.