Dispose Match/Room

how to Dispose match Manually ?
I have room of 5 Players when last players leave want to Dispose room Manually .Nakama also dispose match , but in some cases last player can send the leave request

Please give the authoritative multiplayer matches a good read:

https://heroiclabs.com/docs/gameplay-multiplayer-server-multiplayer/#host-node

At the end of the section it reads:

This match handler above does not do any work but demonstrates the various hooks into the authoritative realtime engine. If nil is returned the match is stopped.

You can return nil on MatchJoin, MatchLeave, and MatchLoop as the value of the state object - and this signals to Nakama to stop the match.

1 Like