I am trying to make a lobby for my first person shooter, and i want to have a scrollview with all available matches. But when I make a match it does not find any matches. Any idea what messed up?
` public void RefreshRoomList()
{
ClearRoomList();
networkManager.matchMaker.ListMatches(0, 20, “”, true, 0, 0, OnMatchList);
status.text = "Loading...";
}`
public void OnMatchList(bool succes,string extendedInfo,List<MatchInfoSnapshot> matchList)
{
status.text = "";
if(!succes || matchList == null)
{
status.text = "Couldn't get room list. That is all we know";
return;
}
foreach (MatchInfoSnapshot match in matchList)
{
GameObject roomListItemGO = Instantiate(roomListItemPrefab);
roomListItemGO.transform.SetParent(roomListParent);
RoomListItem roomListItem = roomListItemGO.GetComponent<RoomListItem>();
if(roomListItem != null)
{
roomListItem.Setup(match, JoinRoom);
}
roomList.Add(roomListItemGO);
}
if (roomList.Count == 0)
{
status.text = "No room at the moment, make your own room!, it is free!!!";
}
}