Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Reconnecting on mobile after backgrounding

$
0
0
Hello!
I'm trying to catch the situation of our game getting foregrounded after some time in the background and reconnecting to master (and possibly game server). At the moment, in Unity, I add the hook OnApplicationPause to a monobehavior and check we are unpausing. This triggers as normal, but when I check the LoadBalancingClient.IsConnectedAndReady it returns true regardless of the actual state. Not until I actually try to send data or trigger an API call do I get a 'peerstate: disconnected' error. At this point the boolean IsConnectedAndReady now reflects the true state of the connection.

What should I do to be able to query connectivity?

Viewing all articles
Browse latest Browse all 15755

Latest Images

Trending Articles



Latest Images