ChatGui.OnDestroy C# (CSharp) Method

OnDestroy() public method

To avoid the Editor becoming unresponsive, disconnect the Chat connection.
public OnDestroy ( ) : void
return void
    public void OnDestroy()
    {
        if (Instance != null && Instance == this)
        {
            if (chatClient != null)
            {
                chatClient.Disconnect();
            }
        }
    }