Photon Networking 2 - Listing Players and Joining Rooms

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 85

  • @moosesnWoop
    @moosesnWoop 4 года назад +4

    I've spent MONTHs trying to figure this out - and FINALLY I have achieved something.
    It's been a long learning curve, but trust me when I say, you have made it SO much easier!
    Will drop a donation sometime for the tutorials, you deserve it mate!
    S/o from South Africa!

  • @RYMY
    @RYMY 4 года назад +1

    Hello, I dont know if you still check these videos but i really need help.
    Im at 2:21 and when ive made the code i get the error
    'Player' does not contain a definition for 'NickName' and no accessible extenaion method 'NickName' accepting a first argument of type 'Player' could not be found (are you missing a using directive or an assembly reference?)
    Please help!...

    • @RYMY
      @RYMY 4 года назад

      Im not sure if this will work ill update if it does but i went in GameSettings script and made the _nickName into a public static instead of private so now my PlayerListing script is
      using Photon.Realtime;
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using UnityEngine.UI;
      public class PlayerListing : MonoBehaviour
      {
      [SerializeField]
      private Text _text;
      private Player _player;
      public void SetPlayerInfo(Player player)
      {
      _player = player;
      _text.text = GameSettings._nickName;

      }
      }
      Anyone whos smart can they tell me if this will work?

    • @Itsfarrel
      @Itsfarrel 3 года назад

      Same in here

    • @andreigaming2863
      @andreigaming2863 2 года назад

      Later in the video he changed private Player _player to public Player Player { get; private set; } so change _player = player to Player = player

    • @crashzzalex9218
      @crashzzalex9218 Год назад

      I have same and I can’t solve

  • @Blessy4543213
    @Blessy4543213 5 лет назад +3

    I have come this far,it works perfectly!, thanks a lot

    • @hermanwong5813
      @hermanwong5813 4 года назад

      hay, i still stuck on this part, can you help me to check my programming?

  • @naayif9034
    @naayif9034 4 года назад +1

    How can I get the order in which players join the room so I can assign them player ids.

  • @krazykase3419
    @krazykase3419 Год назад

    is there a way to add a player to a array when the player joins

  • @DiegoOliveiraProf
    @DiegoOliveiraProf 4 года назад +1

    anyone could enter the room with no error? for me everything is working but it gives me an error message: Client is on Game Server (must be Master Server for matchmaking)

  • @mertonur7065
    @mertonur7065 4 года назад +2

    JoinRoom failed. Client is on MasterServer (must be Master Server for matchmaking)but not ready for operations (State: ConnectingToGameserver). Wait for callback: OnJoinedLobby or OnConnectedToMaster. How Can i fix it

    • @awsumturtle
      @awsumturtle 4 года назад

      Do you have PhotonNetwork.JoinLobby(); in your TestConnect on the method OnConnectedToMaster?

    • @rismanto5894
      @rismanto5894 4 года назад

      @@awsumturtle Yes, I have. And then?

    • @Denis-hk8he
      @Denis-hk8he 3 года назад

      Hey, I got the same error, have you fixed it?

  • @ejs7721
    @ejs7721 3 года назад

    i have an error that says 'PlayerListingMenu.OnPlayerEnteredRoom(Player)': no suitable method found to override, in the player listing menu script
    i need help

  • @DiegoOliveiraProf
    @DiegoOliveiraProf 4 года назад

    how to update my rooms list to show the room I have just created? it is only showing other players rooms, furthermore, when the game is running and other people create new rooms, they are not shown. The same is happening for the players names...

  • @deepgames9091
    @deepgames9091 3 года назад +1

    Actually I have another Player class in my script which is very important in my project so VS is only showing me the Player class that I have and made and Photon Player class what should I do. By the way I'm tring to make a multiplayer Tic Tac Toe in unity using Pun can Please help in my this simple problem.

  • @siberkomando2
    @siberkomando2 4 года назад +2

    I encounter this error when I want to connect to an installed room. how can i solve it. Education is very high quality. Thank you
    Debug.LogError("JoinRoom failed. Client is on " + NetworkingClient.Server + " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : "but not ready for operations (State: " + NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster.");

    • @tadask5662
      @tadask5662 4 года назад

      Same here, and I have no clue what to do about it. I am really looking for an answer to this issue.

  • @lethekun
    @lethekun 5 лет назад +4

    I guess you forgot some little parts again. I don't have a RoomsCanvases class from the previous videos. :/ I don't have the part where you build the currentRoomCanvas too, though I managed to duplicate and convert it from the CreateOrJoinCanvas. But I can not write RoomsCanvases :)

    • @FirstGearGames
      @FirstGearGames  5 лет назад +2

      The good news is that I didn't miss covering that aspect. The bad news is I have no idea how the video disappeared from the playlist. It's stored in my archives. Please give me a moment to figure out what kind of black magic youtube is throwing at me.

    • @FirstGearGames
      @FirstGearGames  5 лет назад +2

      The video has been found and relocated to it's proper home. It's listed in the playlist just before this one ( ruclips.net/video/oAC1dOBlYCk/видео.html ). Thank you so much for your help. If you run into any other issues please don't hesitate to contact me directly on Discord. My current username is Punfish#2019

    • @lethekun
      @lethekun 5 лет назад

      Oh thank you so much :)

  • @LoganoutGm
    @LoganoutGm 4 года назад +1

    Normal when only 2 players are opened, but if you have a third, as soon as there are 2 players in a room, the room is doubled.
    Proceeding to the next video to see if it has been fixed.

  • @joshmaala5497
    @joshmaala5497 Год назад

    where did you get the player.NickName?

  • @ProdAmigo
    @ProdAmigo 4 года назад

    Assets\Scripts\PlayerListingMenu.cs(19,33): error CS0029: Cannot implicitly convert type 'PlayerListingMenu' to 'PlayerListing'

  • @marioetlesherosnintendotut2463
    @marioetlesherosnintendotut2463 3 года назад

    Hi !
    I've recently watched your video about listing rooms with PUN in Unity. It works great for me, thanks you ! Now, I want to list players of the room like you do. However, I want the Master to appear on my UI with others players. Do you know I can make it ?
    Thanks a lot for your answer !

  • @NoName-zr8ir
    @NoName-zr8ir 4 года назад +1

    I had the error "Player namespace inconnue" and just replaced Player with PhotonPlayer and it worked !!

  • @unvisibleskyline294
    @unvisibleskyline294 3 года назад

    Hello @First Gear Games. I'm having a problem with listing players. I did not change the codes, as in the video, but the name of the newly joined user is not visible to other users. The system, which worked with the same codes before, does not work now. What would be the reason?

    • @unvisibleskyline294
      @unvisibleskyline294 3 года назад

      In addition, the names of existing users appear in the new user.

    • @unvisibleskyline294
      @unvisibleskyline294 3 года назад

      I'am fixed problem.
      public override void OnPlayerEnteredRoom(Player newPlayer)
      {
      StartCoroutine(AddList(newPlayer));
      }
      IEnumerator AddList(Player player)
      {
      bool wait = true;
      while (wait)
      {
      if (player.NickName != "")
      {
      AddPlayerListing(player);
      wait = false;
      }
      yield return new WaitForEndOfFrame();
      }
      }

    • @erkush34
      @erkush34 3 года назад

      ı guees ı am having your issue at the moment. but the point is. Public override void OnplayeEnteredRoom is not calling. :/ there is a debug and when ı joined that room from exe. editor is not showing my debug

  • @huynhviettham
    @huynhviettham 4 года назад +1

    I have watched your video, but I don't see myself in my own room, please help me

  • @imlogvn
    @imlogvn 2 года назад

    error: SingletonScriptableObject -> Instance -> results length is - for type MasterManager

    • @andreigaming2863
      @andreigaming2863 2 года назад

      Create A "Recources" Folder (without the " ") And Add All The ScriptableObjects In It.

  • @elyazer6296
    @elyazer6296 4 года назад

    Hello all, how can i pick a specific player from room and assign it as killer, to be able to kill other players,

  • @АрсенийСкобелин-о9ь

    Hello, thanks for your awesome videos. I have a question about Room List. When the last player leaves the room, Room Listing prefab is not deleted. How fix it?

    • @FirstGearGames
      @FirstGearGames  5 лет назад

      You would likely just clear out the children of the transform which holds listings. I have a fix episode that's just after the leaving room video which may fix your issue; it covers a few listings issues. Please continue onward to see if that new information solves your problem.

  • @CalitoMr
    @CalitoMr 3 года назад

    Creat otr join room canvas how to make it the script pkease help

  • @CalitoMr
    @CalitoMr 3 года назад

    How creat room litin menu in script crear or join room

  • @meghagupta5949
    @meghagupta5949 4 года назад

    Hi, I have implemented some of the features using this tutorial (thank you for that). However, I am facing an issue. Player actions in the two builds do not sync. I am not getting the reason behind this. Could you please help?

    • @FirstGearGames
      @FirstGearGames  4 года назад

      Hey, I would recommend posting your problem specifically on their forums. I can't really offer help not related to the videos because it could be any variety of things. Forum members for PUN2 are pretty helpful, give them a shot.

    • @meghagupta5949
      @meghagupta5949 4 года назад +1

      @@FirstGearGames Hi, thank you for your response. I figured out the solution and it is working fine now. Your tutorials offered much help. Thank you for that as well :)

  • @ceoson1225
    @ceoson1225 4 года назад

    how i can loadlevel with create room?

  • @koki10190
    @koki10190 4 года назад

    it dosent show the players in the room

  • @chandradelon237
    @chandradelon237 4 года назад

    I don't know why i can't join a room that is listed in the room listing menu scrollview, can you help me?

    • @chandradelon237
      @chandradelon237 4 года назад

      When i click the room once, nothing happened. Then,
      this is the error message after clicking the room list button few times "JoinRoom failed. Client is on GameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.
      "

    • @FirstGearGames
      @FirstGearGames  4 года назад

      @@chandradelon237 sounds like you somehow became disconnected from lobby or master. Check for disconnect/on left callbacks.

    • @chandradelon237
      @chandradelon237 4 года назад

      @@FirstGearGames Oh sir, it was my silly mistake to not call OnJoinedRoom to debug something, but it connected to the room and show list of player that is available. But now i have new problem which is i can't connect/see the room in certain device like from android to android , it seems to be working on some device (android) to my PC build. Do you have any idea what might be the cause of this problem?

  • @FireJojoBoy
    @FireJojoBoy 5 лет назад

    and _roomscanvases is not in my script for some reason

  • @NeedlessGamers
    @NeedlessGamers 4 года назад

    When I try to drag my playerlisting prefab onto the script it does not let me. Would anyone be able to help?

    • @YarikASMRPOMIRCHIY
      @YarikASMRPOMIRCHIY 4 года назад

      u probalby didnt switch the name of either class or file

    • @FirstGearGames
      @FirstGearGames  4 года назад

      Sounds right, filename likely doesn't match class name or your prefab doesn't have script attached.

  • @hermanwong5813
    @hermanwong5813 4 года назад

    Even though I follow the new video, the player still cannot be shown. I even download the source and build the software, and it doesn't work too. Can somebody help me? please.

    • @FirstGearGames
      @FirstGearGames  4 года назад

      I'll take a look at source. What unity version?

    • @hermanwong5813
      @hermanwong5813 4 года назад

      @@FirstGearGames Unity 2018.4.15f1 (64-bit)

    • @hermanwong5813
      @hermanwong5813 4 года назад

      @@FirstGearGames Thanks for considering my question

    • @FirstGearGames
      @FirstGearGames  4 года назад

      @@hermanwong5813 Tried on 2018.4.12f1 and it worked both build, and editor hosting. Although, I couldn't join the room at with build hosting; I had to stop and hit play again on the editor. I'm curious if this is a Photon issue though as I've seen it happen with other projects; sometimes joining rooms randomly fail.

    • @hermanwong5813
      @hermanwong5813 4 года назад

      @@FirstGearGames I downloaded 2018.4.12 version and tried your source code . The problem still exist.

  • @lolcoconut
    @lolcoconut 5 лет назад

    I would love a tutorial explaining PlayFab cloudscript and doing different things such as leveling a player up once they reach the required xp defined in title data and updating player stats and player data if you can!

  • @Vamshiallstar
    @Vamshiallstar 5 лет назад

    can u make videos on Tnet

    • @FirstGearGames
      @FirstGearGames  5 лет назад

      Hi, I generally only cover free assets and tools. I'm unfortunately on hiatus at the moment, but afterwards I'm going to roll out some already planned videos.

  • @FireJojoBoy
    @FireJojoBoy 5 лет назад

    does not list my name ):

  • @saadanees7989
    @saadanees7989 4 года назад

    Its Room not Rumm.

  • @batnikelam-mavzer443
    @batnikelam-mavzer443 3 года назад

    gj

  • @wadevandoorne664
    @wadevandoorne664 3 года назад

    Rum