Chapter 2. Photon Unity Networking – The Chat Client

In the last chapter, we reviewed the Unity Networking API provided with the Unity game engine. In this chapter, we will review an alternative to Unity Networking, called Photon Unity Networking (PUN).

In this chapter, we will cover:

  • How PUN works
  • The differences and similarities between PUN and Unity Networking
  • Setting up PUN with Photon Cloud
  • Using PhotonViews
  • Connecting to Photon
  • Getting a list of rooms
  • Creating and joining rooms
  • Filtering lobby results by preference
  • Automatic matchmaking
  • Using FindFriends
  • Syncing a level between players
  • At the end of the chapter, we will create a chat client built on top of PUN

Photon Unity Networking is provided by ExitGames. It aims to provide an API consistent with ...

Get Unity Multiplayer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.