Handle device offline status
Options
At present I am working on multiplayer game. I don't have any problem in working of this game.
But I want to detect device offline status and want to display appropriate message to the player.
For this I have implemented following methods and it gets called by the server.
But I got following error in console that represented in following image.
How to handle condition when device not connected to internet and give appropriate message to player?
But I want to detect device offline status and want to display appropriate message to the player.
For this I have implemented following methods and it gets called by the server.
void OnFailedToConnectToPhoton() { Debug.Log("OnFailedToConnectToPhoton"); } void OnConnectionFail() { Debug.Log("OnConnectionFail"); }
But I got following error in console that represented in following image.
How to handle condition when device not connected to internet and give appropriate message to player?
0
Comments
-
Connect*() returns a bool. When that's false, something like this happened (even before a connection could be established).
"But I got following error in console that represented in following image." - The exception is just logged. It still calls "OnFailedToConnectToPhoton" as you can see in the 2nd line.
I think Unity also has a check if the client has any connection at all. Check their docs, too0 -
@Tobias, I am waiting for your reply from long time.
Thanks for your help. I understand it correctly and if in future I stuck in any difficulty then please help me.0 -
Of course we will try to help. However, support-time is limited and sometimes you have to wait a few days. Especially for the free support.0