Is there a way on client to know when it failed to connect to server ?
Are you using the core Unity Transport package (com.unity.transport
) directly or through Netcode for GameObjects?
If the former, you’ll get a Disconnect
event on the connection that failed to be established. If the latter, OnClientDisconnectCallback
should be invoked and the client’s NetworkManager
will shut down. By default both should happen after about 30 seconds, but that’s configurable.
I’m using Netcode thanks for your answer