Creating a chat window
Personally, I like to optimize tasks as much as possible. A lot of the time, we waste a lot of time creating things from scratch when they already exist or we can simply reuse something else. This is the case with the chat feature we are going to implement.
We could spend more than 100 pages creating a chat interface from scratch, but what if Photon already gave us a good basis to start with?
Figure 10.4 – Photon Chat example scene
As you can see in the preceding screenshot, Photon has done much of the work for us. This screenshot is of the chat interface that can be found in one of their example scenes. Specifically, you can test it by opening the DemoChat scene found in Assets | Photon | Photon Chat | Demos | DemoChat.
The strategy we are going to follow is to reuse this wonderful window that Photon offers us. We will remove the functionalities we don’t need and, in this way, we will have the chat screen finished...