Following the start-up guide process for the MpsSamples UnityMirror client and server project:
I setup everything properly with Docker so I could test out the client server connection locally. After I followed the steps labeled for starting the server, verified that the heartbeat shows it is Active, then start the client...it connects up, the PlayFab account is created with the silent authorization based on the device id, the client UI is updated to show that I've successfully connected and with the new account's PlayFabId displayed. Then, after about 30-60 seconds the client shows a message that the server is terminating and the client is disconnected.
In the guide it states:
If the GSDK is integrated correctly, LocalMultiplayerAgent prints the following outputs: CurrentGameState - Initializing (this is optional and may not show up if your game server directly calls GSDK::ReadyForPlayers and does not call GSDK::Start) CurrentGameState - StandingBy CurrentGameState - Active CurrentGameState - Terminating If the shutdown callbacks are set up correctly, your game server exits soon after the state is set to terminating. It is important to verify that the game server exits to avoid ungraceful shutdowns on the PlayFab platform.
I've verified this happens. I did more research on this and found that the MultiplayerSettings.json has NumHeartBeatsForActivateResponse and NumHeartBeatsForTerminateResponse. After NumHeartBeatsForActivateResponse heartbeats, LocalMultiplayerAgent requests the game server to move from standby to active. Then after NumHeartBeatsForTerminateResponse heartbeats LocalMultiplayerAgent requests the game server to move from active to terminated.
Is this MultiplayerSettings.json only used for local testing?
When I setup the server on PlayFab, it won't be terminating the server after # of heartbeats anymore, right?
And for local testing purposes, do I just need to set NumHeartBeatsForTerminateResponse to some really high amount so that I can test server-client messaging for different features properly without it just terminating? Or is there a way to disable it so that it will transition to terminating only once no clients are connected anymore?