How to connect to the Master Server?

How do i connect to the master server? It always says it cant connect…

void MastServ () {
		MasterServer.ipAddress = masterServerIP;
		MasterServer.port = masterServerPort;
		MasterServer.RequestHostList("RobotCountDown");
}

in my server creation function:

	Network.InitializeServer(2, PORT, !Network.HavePublicAddress());
	MasterServer.RegisterHost(myGameType, myGameName, myGameDesc);

what am i doing wrong?

Hi,

Not trying to be rude, but if you simply tried to google “unity connect to master server”, you would see many tutorials about this.

Or you could try searching through the unity documentation(link to page I was referring to).

If you did actually go through these, and they didn’t help, try adding some Debug.Log statements to make sure the server is actually being initialized.

Please feel free to ask if you need further assistance.

Best of luck,

SeeSharp.

solved it.

I can connect to my own master server if I use

MasterServer.ipAdress correctly.