- Home /
[netcode] How to get connected clients on client side?
Like on server: NetworkManager.Singleton.ConnectedClients[clientID]
Error: ConnectedClients should only be accessed on server.
Answer by Bunny83 · Mar 19 at 10:58 AM
I haven't used the new netcode framework. However according to the documentation the ConnectedClients can only be access on the server which makes totally sense. All clients are connected to the server. Clients are not connected to other clients. It's a star network with the server in the center.
If you need / want certain information about all clients available on all clients, the server has to manually provide them to all clients.
Be careful about what information you actually share with all clients. Cheaters / hackers can access any data that you share with them. So it's always a good idea carefully select the data you send to your clients.
Your answer

Follow this Question
Related Questions
Multi player Game Plugin 1 Answer
Unet server setup 0 Answers
Connect different project through networking 0 Answers
How does AssignClientAuthority work? 1 Answer