On Client - How to know how many other players there is?

Hello folks!

I have been reading UNet doc in trying to find a way on a client to find whose the other “connections”, but without avail…

OnServerConnect and OnClientConnect won’t work. (OnClientConnect is only called for the connecting client).

Why do I need this? I am showing a text when a new player joined (and basically want to keep a list on clients of other player gameobject in a neat network way).

Any help would be welcome!

Keep track of it on the server and notify the clients when there is a change?

Yeah that was the solution I had in mind. Not ideal. But wtv, if thats the way to do it. So be it.

Typically nowadays you don’t want one client to be able to access details about another client, because that can lead to some pretty nasty stuff (like DDOS’s and the like) since you’re basically giving client IP’s to everyone. If you are only ever connected to the server, you only have access to one IP that isn’t yours and no one else’s.

So if one client needs to know about another, you let the server do the talking.