Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Create a ready feature in the lobby

Discussion in 'Lobby' started by kkm1010k, Nov 8, 2023.

  1. kkm1010k

    kkm1010k

    Joined:
    Mar 8, 2023
    Posts:
    3
    Literally, I want to run a function in the lobby that makes the player appear ready if the player is ready.
    I searched a lot of information, but couldn't find the information I wanted.
    What I'm curious about is how I can implement the ready function.
    I'm not asking you to write the code for me.
    Just tell me how to make it
     
  2. bartj-unity

    bartj-unity

    Unity Technologies

    Joined:
    Sep 9, 2021
    Posts:
    26
    The simplest way seems like it would be to use the player data bag attached to each player object in the lobby. You could store a "ready" boolean there, and then using the events for lobby updates, run your function to make a player "appear ready" when a player update includes a switch from false to true for that data bag value. Not sure if you've looked at the Lobby sample project at all, but you can see an example of this there.
     
    kkm1010k likes this.
  3. kkm1010k

    kkm1010k

    Joined:
    Mar 8, 2023
    Posts:
    3
    thank you for the quick reply. i will try this