Introduction to Multiplayer Games With Unity and Photon | raywenderlich.com

Learn how to make your own multiplayer game with Unity and the Photon Unity Networking (PUN) library.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1142814-introduction-to-multiplayer-games-with-unity-and-photon

Hai. Really great tutorial. But after implementing as you said, when 2 players are connected, when i press Quit Game button in Master side nothing is happening. But when i press the button on Client side that app is closed and on Master side the Launcher scene is loaded but connection status is still ā€˜Connectingā€™. Can you please tell me the reason behind this phenomena? Thanks.

@raunaqness Can you please help with this when you get a chance? Thank you - much appreciated! :]

@vinodakula This usually happens when either

  1. the 2 clients connect to servers in different regions (print server name in logs to be sure), or
  2. very high latency on any one of the clients
  3. some bug in the Photon library

You should try :

  • print and view logs and you might see where the anomaly exists
  • check out photon forums, I faced a lot of similar issues myself while writing the tutorial

Good luck!

Is this tutorial still relevant on Unity 2019 and Photon2 if I want to build for Android platform?

Not sure whether itā€™s the version of Unity or the version of Photon, but the tutorial doesnā€™t work with Unity 2019, regardless of platform. The supplied project seems to be misconfigured in some way. The Launcher derives from MonoBehaviourPunCallbacks, but Unity complains ā€œerror CS0106: The modifier ā€˜overrideā€™ is not valid for this itemā€ for all the callbacks.

@raunaqness Do you have any feedback about this? Thank you - much appreciated! :]

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!