"1 - Lobby" corrections

It's said in the "1 - Lobby":
And then we can hit Play. You should see some logs in the Unity Console. One of the should notify you, that you "Received your UserID from server".

actually, the first log message I get is: "PUN got region list. Going to ping minimum regions, based on this previous result summary: ru;52;asia,au,cae,eu,in,jp,kr,ru,rue,sa,us,usw", and then the list of ping of each server follows.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @develax,

    Thank you for choosing Photon and for your report!

    The tutorial was originally meant for PUN Classic and then we port it to PUN2.
    This issue is one of the leftovers from the porting.

    We will fix it by removing the paragraph talking about the console log messages.
  • develax
    develax ✭✭
    edited June 2019
    Ok, thanks!
    If you don't mind I'll post any inaccuracies I may find as I go through the tutorial.

    In 5 - Building the Player the way supposed to apply prefab changes has been changed and this picture is not helpful anymore:


  • JohnTube
    JohnTube ✭✭✭✭✭
    hi @develax,

    Thanks again for your findings, keep them coming and we will try to fix them one by one.
  • develax
    develax ✭✭
    edited June 2019
    Hello again,
    I've got a couple of questions today.

    1.
    In the PlayerAnimatorManager script we use double condition check like:
    if (!photonView.IsMine && PhotonNetwork.IsConnected)
        return;
    but later on in the PlayerManager script, we don't check for PhotonNetwork.IsConnected
    if (photonView.IsMine)
        cameraWork.OnStartFollowing();
    why not? I keep in mind that we have a special FollowOnStart flag in the CameraWork script but it looks a bit more complicated than the previous one. I might be missing something.

    2.
    In the "5 - Building the Player / Health setup"
    it's said
    "In the Update() method, after we ProcessInputs, let's add this and save PlayerManager Script"
    .
    Just curious why after? I mean, maybe we don't need process inputs or do something else at all when we are already dead. It's not that important but it is emphasized in the text, so why it matters?
  • develax said:

    It's said in the "1 - Lobby":
    And then we can hit Play. You should see some logs in the Unity Console. One of the should notify you, that you "Received your UserID from server".

    actually, the first log message I get is: "PUN got region list. Going to ping minimum regions, based on this previous result summary: ru;52;asia,au,cae,eu,in,jp,kr,ru,rue,sa,us,usw", and then the list of ping of each server follows.

    Hello, I am doing the Basic tutorial and I got an error in the Lobby part:
    https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/pun-basics-tutorial/lobby

    I put all the code and when I hit Play, after the summary of Pings, it shows the following errors;
    OperationResponse 230: ReturnCode: 32755 (Authentication type not supported). Parameters: {} Server: NameServer Address: ns.exitgames.com:5058
    UnityEngine.Debug:LogError(Object)
    Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2008)
    Photon.Realtime.LoadBalancingClient:OnOperationResponse(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2082)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer) (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:619)
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:550)
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1504)
    Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:116)
    PUN Basics Tutorial/Launcher: OnDisconnected() was called by PUN with reason DisconnectByClientLogic
    UnityEngine.Debug:LogWarningFormat(String, Object[])
    Com.MyCompany.MyGame.Launcher:OnDisconnected(DisconnectCause) (at Assets/SCRIPTS/Launcher.cs:95)
    Photon.Realtime.ConnectionCallbacksContainer:OnDisconnected(DisconnectCause) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3428)
    Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2489)
    ExitGames.Client.Photon.<>c__DisplayClass103_0:<EnqueueStatusCallback>b__0() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PeerBase.cs:906)
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/EnetPeer.cs:428)
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at C:/Dev/photon-sdk-dotnet/PhotonDotnet/PhotonPeer.cs:1504)
    Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:116)
    Any help please?
  • develax
    develax ✭✭
    edited June 2019
    @josecm
    It'd be better to create a new thread for your question. Otherwise, it'll be a jumble of answers to my questions and yours.
  • develax
    develax ✭✭
    edited June 2019
    In "8 - Player Instantiation" the if-check is a dangerous technique to use for Unity objects:
    if (PlayerPrefab == null)
    {
        Debug.LogError("Missing playerPrefab Reference. Please set it up in GameObject 'Game Manager'", this);
    }
    as in some cases it creates the temptation to write if (PlayerPrefab != null) which surprisingly wouldn't work because when it's not set it returns the "null" string instead of real null. Only `==` operator is overloaded for this case for Unity objects (read "Don't Use == null On Unity Objects" for detais).

    Use if (PlayerPrefab){...} insdead or if (!PlayerPrefab){...} - it would work consistently for all Unity objects even for those which can be normally compared with null such as `MonoBehaviour`.

  • develax said:

    @josecm
    It'd be better to create a new thread for your question. Otherwise, it'll be a jumble of answers to my questions and yours.

    Ok, sorry. I thought that will better in the same thread if there is some one talking about the same.
    I am looking to delete my previous message but i don´t see a "delete" button there.