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

feat(NetworkManager): expose methods for clientId to transportId mappings #2668

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

patrickexe
Copy link

This feature gives access to 2 new get methods in NetworkManager that allow the user to convert between clientId and transportId and vice versa.

Our use case for this feature was using Facepunch.Steamworks and our own twist on the community transport that pairs with it. We need to be able to get the SteamId of any connected client from their clientId for various reasons, one being server-side saving of client specific data that is then identified via SteamId.

This feature resolves #2359.

Changelog

  • Added: A getter function in NetworkManager that can convert from clientId to transportId and vice versa.

Testing and Documentation

  • No tests have been added.

@patrickexe patrickexe requested a review from a team as a code owner August 20, 2023 14:43
@unity-cla-assistant
Copy link

unity-cla-assistant commented Aug 20, 2023

CLA assistant check
All committers have signed the CLA.

@kulkalkul
Copy link

Yeah, I hit this too, this is a must. Considering even UnityTransport uses this in its Send method, it is obvious these needs to be public as other transports (and users) definitely might use this.

@patrickexe
Copy link
Author

Yeah, I hit this too, this is a must. Considering even UnityTransport uses this in its Send method, it is obvious these needs to be public as other transports (and users) definitely might use this.

Yeah I'm currently running on a forked version of this repo, with this change implemented. It's slightly out of sync with main but feel free to use or just fork your own copy if you need this feature soon 👍🏼

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.

Support translation between TransportID and ClientID in NetworkManager
3 participants