(Unity playeverywhere EOS UPM plugin) How to get a callback from the EOS API when loss of connection detected (e.g. after LAN cable pull)?

How do I use the EOS API to detect disconnection from EOS with loss of network connectivity?

If I do the following:

  • run one of the samples which comes with the playeverywhere UPM plugin (https://github.com/EOS-Contrib/eos\_plugin\_for\_unity)
  • log in and wait until the log says the sample is properly connected to EOS Connect
  • pull the network cable
  • (wait approx. 30 seconds
  • internal EOS logs start appearing re: failures to re-authorise
    • it retries a bunch of times
    • eventually failing with EOS_NoConnection
  • however, none of the callbacks in the Unity sample seem to fire even after waiting several minutes, and consequently it’s still under the impression that it’s connected to both Connect and Auth

Is there any way to hook into a callback to whatever the EOS API is doing internally to detect the connection failure?

If this happens during gameplay then there’s no way (that I can see) of informing them that they’ve lost their connection to the EOS backend - a situation which will throw up basically the same problems as starting in offline mode, with the additional complication that the player _was_ online.

How would you suggest we deal with this?

on the plus side… if I re-plug the network cable after it detects all of this is going on then it quietly reconnects and - assuming this was a transient disconnection - then the user would have been none the wiser :sweat_smile:

just in case, here’s my log…

[Content removed] Thomas​ (sorry for atting you, I know it’s bad form :sweat_smile:)

Would very much appreciate an assist on this one.

Hi Alex,

The EOS Plugin currently does not have a callback to hook into for the case you’re describing. I’ll have one of our engineers look into what we can potentially expose or a way you can detect the connection state.

-Jeff

thanks Jeff! Appreciated :smiley: