Match options in unet for servers list.
Hello, guys. Can you please help me. And sorry for my eanglish. I have creating online game with UNET system and using lobby manager to get servers list and create a room. As default system - it has 3 varables to get from room: serverName and currrent players/roomSize.
public void Populate(MatchInfoSnapshot match, LobbyManager lobbyManager, Color c)
{
serverInfoText.text = match.name;
slotInfo.text = match.currentSize.ToString() + "/" + match.maxSize.ToString(); ;
NetworkID networkID = match.networkId;
joinButton.onClick.RemoveAllListeners();
joinButton.onClick.AddListener(() => { JoinMatch(networkID, lobbyManager); });
GetComponent<Image>().color = c;
}
How can I add some data to "match" variable? Like game map, or game mode? I have tryed to find some info about MatchInfoSnapshot and add data to that, but no results.
For now I can see only one solution. Set all variables into one, separate them with special simbols. And parse this variable when you need to name, map, game mode...
Where would you store this "string" of variables? I was attempting to do that with the match name, but I couldn't figure out how to change it once the match has been created.
Your answer
Follow this Question
Related Questions
[Multiplayer Lobby] NetworkManager has a NetworkIdentity component 1 Answer
Modifying Unity Network Lobby 0 Answers
Exiting a UNET lobby causes future ClientRPC calls to be ignored. 1 Answer
How can players select their own preferences in the lobby? 1 Answer
How to spawn a different game player prefab based on player choice with Network Lobby Manager? 0 Answers