Last active
June 3, 2018 16:37
-
-
Save BrentFarris/e2463f8c65784a5b5766 to your computer and use it in GitHub Desktop.
Forge Networking Sample: Registering Disconnected for Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: 15937 is the port number of the socket you started the connection on | |
Networking.Sockets[15937].serverDisconnected += ByeBye; | |
void ByeBye(string reason) | |
{ | |
Debug.Log("The server has disconnected you because of: " + reason); | |
} | |
// Or you can in-line if you wish | |
Networking.Sockets[15937].serverDisconnected += delegate(string reason) | |
{ | |
Debug.Log("The server has disconnected you because of: " + reason); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment