1.what is different of master server and unity networking api(not have master server,use public ip to connect) ?
2.benefit of master server ?
3.I want to see example of master server.
4.I don’t understand why we have to use the master server,when have unity networking api (use public ip to connect).
unity networking api(not have master server)
If have initialize server public ip will save on database server ,on client open scene lobby client will see room(server1,server2,load form database) > join > play game .
have master server
It same unity networking api,but don’t use database server to save public ip.
I can create one room(server),if other create new room(server,room2 or first),can’t create new room.
Thank you,I will wait for the answer for everyone.
Let’s start with an example:
Player A is on the same LAN as player B. Player A starts a server instance and player B can connect to it using player A’s ip address. No master server is needed because they know eachother ip address to connect directly on the same LAN.
Example 2:
Player A starts a server in his LAN at home.
Player B is connected to the internet at his home but doesn’t know the ip address of player A.
When player A starts the server instance, it will send it’s public ip address to the master server.
When player B wants to connect to player A, it will retrieve the ip address of player A from the master server and the master server (using the NAT facilitator) will provide NAT punchthrough if needed to make that connection possible.
thank you.
I found one problem(use master server).
If have player A starts the server instance and player B starts the server instance,player C can connect to server player A but player D can’t connect to server B.
A(server) < C(connect to A) // can connect
B(server) < D(connect to B)// can’t connect
E(server) < F(connect to B)// can’t connect
G(server) < H(connect to B)// can’t connect