Checking If Still Connected

How is the best way for a client or server to test it is still connected. As occasionally I get an error if if my server disconnects and one of it’s controlled assets tries to call an RPC in that rare split second before the level is unloaded. So I would like to check the connection exists before calling the said RPC.

Cheers.

If the Network.connections is 0 on the client, or less than the proper amount of players on the server, then you know.

You should be able to also put your RPC calls in try-catch blocks (stating the obvious I know).

HTH,
-Jeremy