Basic Settings
To use the PlayNANOO chat service, the PlayNANOO plugin must be configured first.
To receive messages, you must implement callback methods in the application. In Unity (C#), the IChatListener interface is defined, and you should use this interface to implement the methods.
Source Code
using UnityEngine;
using PlayNANOO.ChatServer;
using PlayNANOO.ChatServer.Models;
public class PlayNANOOChatExample : MonoBehaviour, IChatListener
{
public void OnChannels(ChatChannelModel[] channels)
{
throw new System.NotImplementedException();
}
public void OnConntected()
{
throw new System.NotImplementedException();
}
public void OnDisconnected()
{
throw new System.NotImplementedException();
}
public void OnError(ChatErrorModel error)
{
throw new System.NotImplementedException();
}
public void OnNotifyMessage(ChatInfoModel chatInfo, string message)
{
throw new System.NotImplementedException();
}
public void OnPlayerOnline(ChatPlayerModel[] players)
{
throw new System.NotImplementedException();
}
public void OnPrivateMessage(ChatInfoModel chatInfo, string message)
{
throw new System.NotImplementedException();
}
public void OnPublicMessage(ChatInfoModel chatInfo, string message)
{
throw new System.NotImplementedException();
}
public void OnSubscribed(ChatInfoModel chatInfo)
{
throw new System.NotImplementedException();
}
public void OnUnSubscribed(ChatInfoModel chatInfo)
{
throw new System.NotImplementedException();
}
}