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

Support translation between TransportID and ClientID in NetworkManager #2359

Open
teamclouday opened this issue Dec 22, 2022 · 2 comments · May be fixed by #2668
Open

Support translation between TransportID and ClientID in NetworkManager #2359

teamclouday opened this issue Dec 22, 2022 · 2 comments · May be fixed by #2668
Labels
priority:medium stat:import type:feature New feature, request or improvement

Comments

@teamclouday
Copy link

Is your feature request related to a problem? Please describe.
I'm writing a custom transport and need to access the IDs assigned by the transport to identify the users on the network.
NetworkManager internally uses a different set of ClientIDs and creates a mapping between ClientIDs and TransportIDs, but this information is not accessible.

Describe the solution you'd like
Add following two methods or similar to NetworkManager:

ulong NetworkManager.GetTransportIdentifier(ulong clientId)
ulong NetworkManafer.GetClientId(ulong transportId)

Describe alternatives you've considered
Current solution is to track pending clients and build the exact same mapping in the custom transport, which is redundant in my opinion.

Additional context
See the discussion on Unity Forums for more detail.

@teamclouday teamclouday added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:feature New feature, request or improvement labels Dec 22, 2022
@NoelStephensUnity
Copy link
Collaborator

Notes:
Issue can be resolved but it requires more code than it should.
Good feature request to implement.

@NoelStephensUnity NoelStephensUnity added priority:medium and removed stat:awaiting triage Status - Awaiting triage from the Netcode team. labels Jan 13, 2023
@pschuster
Copy link

I also need access to the Transport -> Client Id mapping for my own transport. Then way how the Issue can be resolved is super complicated and error prone. Having access to that mapping would be super helpful and I don't think it's super harmful. Please add asap as if it takes too long Transport developers must still implement the fallback because there might be users which don't want to upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium stat:import type:feature New feature, request or improvement
Projects
None yet
3 participants