Photon Server and Ping List collection
Hello,
I understood the cloud server logic of PUN (named, master,game servers...), I have no problem in connection to pun servers in my game with best server option. I also want to let client change server option with server props (i.e. ping, number of players in that region, etc...). However, although I found related I could not implement them...
How can I do it? I use PUN2.
I want to contruct following functions but I could not succeed. I could not find any example...
void LoadServers() ==> Load the list of available servers and ping info of each of them (might be a list). The number of active players in that region server would be also great!
void ChangeServer(string servertoken) ==> connect to master server of a given region (i.e. eu or us).
I understood the cloud server logic of PUN (named, master,game servers...), I have no problem in connection to pun servers in my game with best server option. I also want to let client change server option with server props (i.e. ping, number of players in that region, etc...). However, although I found related I could not implement them...
How can I do it? I use PUN2.
I want to contruct following functions but I could not succeed. I could not find any example...
void LoadServers() ==> Load the list of available servers and ping info of each of them (might be a list). The number of active players in that region server would be also great!
void ChangeServer(string servertoken) ==> connect to master server of a given region (i.e. eu or us).
0
Comments
-
Hi @Storm,void LoadServers() ==> Load the list of available servers and ping info of each of them (might be a list). The number of active players in that region server would be also great!
To get the number of players on a server you need to connect to it first. So if you want to get the number of players on each server you need to connect to each master server one by one separately using a single client OR have a LoadBalancingClient per region. Not so convenient but that's how it is.void ChangeServer(string servertoken) ==> connect to master server of a given region (i.e. eu or us).0 -
Thanks a lot!0