heroiclabs / nakama-unity

Unity client for Nakama server.
https://heroiclabs.com/docs/unity-client-guide
Other
407 stars 75 forks source link

Imatch Presences is empty #156

Closed peyman1959 closed 1 year ago

peyman1959 commented 1 year ago

There are 2 player in a match, I cache the Imatch that was returned by the socket.JoinMatchAsync, but one of my clients' match.Presences is empty for no reason! Is there any server-side or client-side permissions that I'm missing?

lugehorsam commented 1 year ago

Hey @peyman1959 -- the first client that joins will be joining an empty matche which is why Presences is empty. You should listen to ISocket.ReceivedMatchPresence for the second client who joins and then call IMatch.UpdatePresences on your match to keep the local copy up to date.