Connection Resiliency in Unity 3D

0 votes

I'm using connection resiliency in a Unity 3D project by setting the recoveryAllowance(60) before init.

However i'm getting trouble logging the user back in when he comes from a paused state.

 

Suppose two users: User A - User B, playing a game

  1. User B goes into another app from his iPhone.
  2. User A gets a notification on OnUserPaused
  3. When User B comes back to the main app, (OnApplicationPause(false), I call WarpClient.recoverConnection() function.
  4. User B can not reconnect - he gets a onConnectDone 4 error. Bad Request i think
  5. User A therefore, does not get a notification on onUserResumed

Is there a working example for Unity3D using connection resiliency. It seems like i'm doing half right but the recover connection part is not working.

Regards

 

asked Apr 16, 2014 in AppWarp by saad.khawaja (10 points)

1 Answer

0 votes
Since, user B was unsuccessful in recovering, he never returned to the game, so user A will not get onUserResumed, instead he should receive onUserLeft. Please test it and confirm.
answered Apr 16, 2014 by Suyash Mohan (900 points)
I understand that. But the question is why couldn't user B recover connection.

I can't seem to reconnect user B - tried numerous times. The internet is working and all but the I get a onconnectdone 4 error when calling the recoverconnection function.
Hi Saad,
We have planned to create a connection resiliency sample for Unity. It will be available on our site on Apr 25. It will illustrate how to use the connection APIs. I will update this thread once its done.
Hey Saad,

Here is our Unity Connection Resiliency Sample https://github.com/SuyashMShepHertz/UnityConnectionResiliencySample

You can read wiki of this sample to understand how connection resiliency can be implemented in Unity https://github.com/SuyashMShepHertz/UnityConnectionResiliencySample/wiki
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...