Skip to main content

Basic Setup

To use the PlayNANOO chat service, first configure the PlayNANOO plugin.

Implement methods as callbacks in the application to receive messages. In Unity (C#), use the IChatListener interface for this implementation.

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();
}
}