Matchmaker not working?

So I’m working on a game with a team, and I’m working on the networking side. I’m very new to Unity, and so I have general LAN setup so that players can both join a game together via a Network Lobby Manager on the same network.

But I want them to be able to join over the internet, I assumed using the matchmaking service. However when I try to use it, it doesn’t seem to work?

I have one computer host the game room, and then the other join that room. But the player who tries to join just sees all the HUD disappear except for a “Add Player” button and they can’t do anything.

Any suggestions?

I have also been in lot of trouble for making Unity matchmaking. Actually the stuff regarding Unity Networking implementation provided on Unity API portal is either outdated or most of time doesn’t work.

But finally I succeeded, this a code snip for match maker. This code is working for LAN and Client will be joining First room from room list. You can modify this code as your ease. :wink:

public class SimpleMatchMaker : MonoBehaviour
{
void Start()
{
NetworkManager.singleton.StartMatchMaker();
}

//call this method to request a match to be created on the server
public void CreateInternetMatch(string matchName)
{
	NetworkManager.singleton.matchMaker.CreateMatch(matchName,4,true,"","","",0,0,OnMatchCreate);
}

//Create Match success calback
void OnMatchCreate(bool success, string info, MatchInfo matchInfoData){
	if (success && matchInfoData != null)
	{
		NetworkServer.Listen(matchInfoData, <Your Port Here>);
                    //Start Host
		NetworkManager.singleton.StartHost(matchInfoData);
	}
	else
	{
		Debug.LogError("Create match failed : " + success + ", " + info);
	}
}

//call this method to find a match through the matchmaker
public void FindInternetMatch(string matchName)
{
	NetworkManager.singleton.matchMaker.ListMatches(0, 20, matchName,false,0,0,OnMatchListFound);
}

void OnMatchListFound(bool success, string info, List<MatchInfoSnapshot> matchInfoSnapshotLst){
	if (success)
	{
		if(matchInfoSnapshotLst.Count != 0)
		{
			//Debug.Log("A list of matches was returned");

			//join the last server (just in case there are two...)
			NetworkManager.singleton.matchMaker.JoinMatch(matchInfoSnapshotLst[0].networkId, "", "", "", 0, 0,OnjoinedMatch);
		}
		else
		{
			Debug.Log ("No matches in requested room!");
		}
	}
	else
	{
		Debug.LogError("Couldn't connect to match maker");
	}
}

void OnjoinedMatch(bool success, string info, MatchInfo matchInfoData){
	if (success)
	{
		//Debug.Log("Able to join a match");
		NetworkManager.singleton.StartClient(matchInfoData);
	}
	else
	{
		Debug.LogError("Join match failed");
	}
}

}