PUN Tutorial - Players Won't join same Room - Failed to Join Room

Hi guys. Newbie here. I just completed the PUN Photon Tutorial, (https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/pun-basics-tutorial/intro) and firstly, i applaud the work done on that tutorial. Far more comprehensive and complete AND accurate than any of the 1000's of you tube videos i have seen floating around, all with broken information or edited on the fly videos missing changes, that leaves many people hosered in the end.

However... upon reaching the UI section (the final part of the tutorial) i took a break an decided to build and launch the tutorial app. I compiled and ran one stand alone and connected, and ran one from within the editor and connected, yet at no point ever will they join the same room together.

I resolved this initially by doing a bit of research and discovering these values set directly after Connection.
            PhotonNetwork.ConnectUsingSettings();
            PhotonNetwork.AuthValues = new AuthenticationValues(Username + Random.Range(0, 100));
            PhotonNetwork.LocalPlayer.NickName = Username + Random.Range(0, 1000000);
This was solved very early in the tutorial , and so i resumed through the tutorial. I did not attempt to make any more builds until nearly completed, and at some point in the tutorial the Connect() function becomes a little more than it started out and the logic gets wrapped into checks.
    public void Connect()
    {
        bIsConnecting = true;
        ProgressLabel.SetActive(true);
        ControlPanel.SetActive(false);
        if (PhotonNetwork.IsConnected)
        {
            PhotonNetwork.JoinRandomRoom();
        }
        else
        {
            PhotonNetwork.GameVersion = gameVersion;
            PhotonNetwork.ConnectUsingSettings();
            PhotonNetwork.AuthValues = new AuthenticationValues(Username + Random.Range(0, 100));
            PhotonNetwork.LocalPlayer.NickName = Username + Random.Range(0, 1000000);
        }
    }

So, long story short.... My two game clients will not join the same room anymore at all. Im stuck at this part and dont know what to do. Cant do anything when i cant join my two players together. :(

Hats off to photon and the tutorial though... i can see Photon being WAYY better than the garbo UNet API I've been struggling with for far too long. TIA

Comments