PUN Classic (v1.x) and Bolt are outdated and will not receive further updates. Of course, existing PUN Classic and Bolt projects will continue to run. New projects should use Fusion or Quantum.
1 - Lobby
Connection to Server, Room Access and Creation
Let's first tackle the core of this tutorial, being able to connect to Photon Cloud server and join a Room or create one if necessary.
Create a new scene, and save it as
Launcher.unity.Create a new C# script
Launcher.Create an empty GameObject in the Hierarchy, named
LauncherAttach the C# script
Launcherto the GameObjectLauncher.Edit the C# script
Launcherto have its content as below
Coding Tip: if you are not copying and pasting (which is recommended, because if you do type everything, you will likely remember it better),
writing comments is very easy, type /// on the line above a method or a property and you'll have the script editor automatically create
a structured comment with for example the <summary> tag.