Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How to associate backfilled playerID with his connectionID?

Discussion in 'Matchmaker' started by dnnkeeper, Jun 28, 2023.

  1. dnnkeeper


    Jul 7, 2013
    I can not get backfilling working after the player disconnects and tries to return to the same server. Matchmaker allocates a new server.
    I assume the reason is that the PlayerId submitted to the matchmaker is the same, so the matchmaker can't assign it to the server where it was previously registered. So I need to call UpdateBackfillTicket from the server with that playerID removed.
    But I can't figure out how to associate the connected player with the PlayerID that he submitted to the matchmaker. I'm not using the Netcode package so I am receiving only connectionID of the player when he connects.
    Do I need that player to send his multiplay services playerID so I can later remove it from the list?
  2. David_Gourde


    Unity Technologies

    Oct 18, 2021
    You are correct, the server needs to keep track of the players and update the backfill ticket when players leave or join the match. You can see an example of how to do this here in the MatchPlay sample (I linked the line where a player leaves). In the sample, when the player disconnect, the server removes them from the backfill ticket, and uses the AuthId to find which player to remove (see here).