- Home /
Unet: Discern between user disconnection and connection lost
As far as I understood, the UnityEngine.Network static class is now Legacy Code. Our network code has been updated to use UNET, therefore I am sure I cannot use the Network class functionalities anymore since I create the connection with the new UnityEngine.Networking.NetworkClient.
However, while the old network code was able to discern between connection lost and user disconnected, the new one is apparently not giving us this information anymore.
Can you suggest any alternative method to retrieve the same information?
Answer by Pallav-Nawani · Jul 12, 2018 at 06:47 AM
It is been a long time since this question was asked. I am answering it in case someone else has the same query.
When your player tries to disconnect, send a message which informs the server that user xxxx wants to disconnect. Then server can disconnect user (or the user can disconnect after it sends the message).