In many ways, our global chatbox will look a lot like the chatbox that we built in Photon. However, rather than having separate chatrooms, we'll create one single global chatbox for everyone. There will also be major API differences to keep in mind—in Photon, we were able to use RPCs to conveniently call a function on all connected clients which handled chat messages. However, in PubNub we will need to handle incoming messages, parse them, and process them as chat messages.
In this chatbox example, we'll expand our chatbox with extra functions such as the
/me command. Additionally, you'll be able to change your name (which will be announced to the room):
using UnityEngine; using System.Collections; public class ...