- Home /
Retrieve server info without password
I am setting up a little project where a player may join a room or create one himself. The rooms are either public or password protected.
The problem is that I would like for all players to able to see some basic information regarding each room, namely: name, description, if it requires a password and the connected/allowed connections ratio.
I am aware that most of those I can get simply through the HostData retrieved when polling the master server, but the number of connected players is not one of them. I am also aware that the server knows the total connections (Network.connections.Length) and could make it available through an RPC call, but that would require a connection, which becomes a problem when there's a password requirement.
So is it possible for the player to request some information about the server without a password (even it is required)? Or would I have to just not password protect the connection and implement that on my own (using additional RPC calls to join a room and request a password, for instance)?
I think you can set CustomProperty to Rooms which is available from the Lobby. So in the rooms keep up to date the properties you want (if it relies on the game) and try to reach it from lobby. I'm not sure in this. Try to search in the documentation.
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Unity Networking Question [Username/Pass] 0 Answers
Network.Connect() never returns InvalidPassword 1 Answer
Reducing server-side application size 0 Answers