PUN Basics Tutorial

Hi all,

I am going through the PUN Basics Tutorial and have just completed section 4, at the end of which I should be able to run a version of the game in Unity and it opens the scene Room for 1. Then I run a published version of the game and join, where it should now load the scene Room for 2. However, this is not happening. There seems to be no connection between the 2.

Has anyone else been through this tutorial and experienced the same noob problem?

TVMIA

Answers

  • can you show the code?
  • Hi @swanne,

    please check if the OnPhotonPlayerConnected(PhotonPlayer other) gets called. You can easily do this by taking a look at the console, because there is already a Debug.Log(...) in the example. If you can't see this, the second client is not joining the same room, so you have to check if something goes wrong there. If you can see it, the second client has joined the same room and the problem is a different one. Please get back here with updated information.
  • I'm having an exactly same problem. (Not PUN but PUN2)
    I can connect to the server from my unity editor and standalone .exe app. But "PhotonNetwork : Loading Level : 2" message never displayed in my console window...

    So, I added an UI element which displays "PhotonNetwork.CurrentRoom.Name". According to the displayed ROOM NAME, my apps aren't connected to the same server.
    How can I solve this problem??

    Sorry for my not-good English(-_-)
  • Hi @petrov,

    please make sure that both clients use the same game version and AppId. You can set both options by using the PhotonServerSettings file. Afterwards please make sure that both clients are trying to join the same room.

    If you have trouble with the Basics Tutorial, you can also take a look at the demo that is included in the PUN package and check and compare the source code from the demo and in your project. Please let me know, if you can't solve this issue.