Check Connection Status
Explains how to check the chat server connection status.
Description
Check if you are currently connected to the chat server by calling the ChatManager.Instance.IsConnected() method.
Method Information
| Item | Content |
|---|---|
| Method | ChatManager.Instance.IsConnected() |
| Return Value | bool - Connection status (true: connected, false: not connected) |
Unity C# Usage Example
using UnityEngine;
public class ChatExample : MonoBehaviour, IChatListener
{
public void IsConnected()
{
bool connected = ChatManager.Instance.IsConnected();
Debug.Log($"Connection Status : {connected}");
}
// ... Other IChatListener method implementations
}