Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How can I detect when a player joins/leaves a lobby?

Discussion in 'Lobby' started by AntAptive, Apr 24, 2023.

  1. AntAptive

    AntAptive

    Joined:
    Nov 8, 2020
    Posts:
    7
    Right now, I'm trying to make a lobby that shows four open slots for players. I wanna make it so when a player joins the lobby, one of the slots becomes their name on the other players' screens.
    I also wanna implement kicking players. I know how to remove a player from a lobby, but I'm not quite sure how to have that execute anything on the kicked player's side, or have the player list update for anyone else in the lobby.
    I don't know if there's a callback for that I don't know about, but any help would be greatly appreciated, thank you!
     
  2. adumovic

    adumovic

    Joined:
    Mar 23, 2019
    Posts:
    3
  3. Golaso

    Golaso

    Joined:
    Nov 21, 2019
    Posts:
    1
    What if the game just crash?
     
  4. dcmrobin

    dcmrobin

    Joined:
    Feb 15, 2021
    Posts:
    7
    Then it do be crashin