I am working on PC based multi-player game. Sometimes during the game the TNServer crashes. I tried to use OnNetworkDisconnect and OnNetworkError but I do not receive notifications. I placed the script with the following fragment on the MainCamera. Please Help.
..........................................................................................
disconnect = false;
void OnNetworkDisconnect() { disconnect = true; }
void OnNetworkError (string error) { disconnect = true; }
void OnGUI () {
if (disconnect)
{ GUI.Label(new Rect(10, 10, 105, 40), "DISCONNECTED"); }
}