Question by
dil33pm · Mar 28, 2016 at 06:44 PM ·
networkingmultiplayer
Unity UNET get all clients connected
I am using UNET in Unity 5.3.2f. I am able to get a LAN connection from clients to a server. I can get the IP addresses from Network.connections[arrayIndex].ipAddress
. But how can I get all the clients connected to the server (populate Network.connections into a variable) and say I want to call a function or variable in one particular client with a particular IP address or other unique identifier?
Thanks.
Comment
Answer by Gatau · May 15, 2016 at 11:31 AM
The NetworkServer has a connections
property which is what you might be looking for.
NetworkServer.connections may be nulls in this list for disconnected clients. It not really count of connections.