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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to run a Server using multiplay service?

Discussion in 'Game Server Hosting' started by sava-game, Feb 14, 2023.

  1. sava-game

    sava-game

    Joined:
    Feb 14, 2023
    Posts:
    21
    I created test server.json in project folder, but getting some errors.
    see the screenshot.
    I am trying to run a sample project from Matchmaker service documentation.
    How to run it on my local?
     

    Attached Files:

  2. danri

    danri

    Unity Technologies

    Joined:
    Jun 21, 2019
    Posts:
    27
    Hello,

    The sample project is attempting to connect to a localhost API that exists in the real Multiplay environment. Currently there is not a way to run this API on your local machine.

    I would suggest adjusting your server codebase to have a mechanism to check if it is running on Multiplay or not. This could be as simple as creating a new command line argument (e.g. "-local") and parsing with the GetCommandLineArgs system method - https://learn.microsoft.com/en-us/dotnet/api/system.environment.getcommandlineargs?view=net-7.0