Search Unity

Question What does ReadyServerForPlayersAsync actually do?

Discussion in 'Game Server Hosting' started by zhare86, Jan 30, 2024.

  1. zhare86


    Mar 28, 2017
    I am confused because I thought that calling MulitplayService.ReadyServerForPlayersAsync notifies the rest of the services inlcuding Matchmaker that the server can now accept players. I expected that before the server calls ReadyServerForPlayersAsync the Matchmaker will not send players to it.

    However, I recently changed the code of the server to do a longer initial setup, and the call to ReadyServerForPlayersAsync is now happening a bit later. What I am seeing is that players sent by the Matchmaker are joining the server before the server has called ReadyServerForPlayersAsync.

    I guess a second question is, if ReadyServerForPlayersAsync is not the way, how can I prevent players joining a server that's not ready?