Search Unity

Question Not able to run a 2nd game with the MatchplaySample code

Discussion in 'Matchmaker' started by shu-yan, Feb 13, 2024.

  1. shu-yan


    Dec 1, 2022
    I tried to follow the ReadMe to set up the MatchplaySample on Unity Game Service, however, I have run into issues where after two clients can successfully matchmade in to the same gaming session, when I restart the clients and Matchmake again, I got a "Matchmaking Error while Assigning a ticket, Check Console for more details" error, but there is no error messages on the console. The last message would just be the normal:
    Polled Ticket: xxx-xxx-xxx Status: InProgress UnityEngine.Debug:Log (object)
    According to , that is because the Matchmaker is returning: MatchmakerPollingResult.MatchAssignmentError

    When this happens, I either have to redeploy the server (by uploading new compiled files to the Build), or wait for a while (30+mins at least). Restarting the server via Unity Game Service dashboard would not do the trick.

    I am at a lost on whether there is an issue with how I set up my Unity environment locally, the way I set up Unity Game Service, or is that a bug in the MatchplaySample (or that it does not support a second game).

    Here are the configuration info that was not covered in the MatchplaySample Readme:
    Dev OS: MacOS Monterey Apple M1 Pro
    Unity version: 2021.3.8f1

    Game Server Hosting:
    Ubuntu (Server) 20.04 LTS
    Fleet Scaling Setting:
    Min available servers: 1
    Max available servers: 1

    only casual-queue is enabled
    Maximum players on a ticket: 2
    Pools: 1
    Pool settings:
    Timeout: 15 Seconds
    Apart from those settings covered from the ReadMe, I follow these settings:

    EDIT: I am not using ParrelSync to run the game client, I run one from the Unity Editor by the Play button, and the other is a compiled client for Mac
  2. guillaumedUnity


    Unity Technologies

    Apr 1, 2021
    Can you give us a matchmaking ticket id that failed ?
    Also, how many maximum servers do you have setup ? It could be that you reached the maximum number of servers running in parallel
  3. shu-yan


    Dec 1, 2022

    Yes, these are the polled ticket that have no problem:
    Polled Ticket: aaaba554-9850-4afd-93e3-09d3723a70c9 Status: InProgress
    UnityEngine.Debug:Log (object)
    Polled Ticket: e550f88f-616d-48d3-8cac-20e4a5fb1187 Status: InProgress
    UnityEngine.Debug:Log (object)
    Polled Ticket: c2b3c3b8-5243-4065-b9c5-f8043fdba970 Status: InProgress
    UnityEngine.Debug:Log (object)

    Then I closed both Clients and restart them again and tried the matchmaking again and this ticket gave the error described in the original post:
    Polled Ticket: e2f2a81e-d3b6-427c-b723-43a61f61b3e7 Status: InProgress
    UnityEngine.Debug:Log (object)

    I restarted both client again and also got the error again with this ticket:
    Polled Ticket: 27fb419c-6d26-4c5d-bfc8-207a57d6de65 Status: InProgress
    UnityEngine.Debug:Log (object)

    Yes, min my fleet scaling setting, I just set the max server to be 1. But given that I disconnected both clients and then closed the clients, shouldn't the server become available for new match?

    UPDATE: I also just tried to increase the scaling setting to max 5 server , but the issue is still there
    Last edited: Feb 14, 2024