This has to deal with Matchmaker. I used this code out of the unity docs.
if (GUILayout.Button("Create Room"))
{
CreateMatchRequest create = new CreateMatchRequest();
create.name = "Roto";
create.size = 4;
create.advertise = true;
create.password = "";
networkMatch.CreateMatch(create, OnMatchCreate);
}
Then in the call back function unity docs shows this…
public void OnMatchCreate(CreateMatchResponse matchResponse)
{
if (matchResponse.success)
{
Debug.Log("Create match succeeded");
matchCreated = true;
Utility.SetAccessTokenForNetwork(matchResponse.networkId, new NetworkAccessToken(matchResponse.accessTokenString));
NetworkServer.Listen(new MatchInfo(matchResponse), 9000);
}
else
{
Debug.LogError("Create match failed");
}
}
How can I get the name of the room (game) just created and other info needed so I can display a list to people looking to join a game? there is noting in the matchResponse object that allows me to get this info. In the Doc they use an object called matchList, but it’s never populated. I put this script on my networkManager