Add Dedicated Game Server Deployments to Unity's Matchmaking

The following leverages the documentation on how to deploy game servers to Edgegap's hosting and orchestration platform from Unity's matchmaking service. It may be out of date, and thus we recommend to follow the documentation, which is available on GitHub.

Need to migrate completely from Multiplay as Unity stops its internal supports for Multiplay on March 30th 2026? Edgegap has a step-by-step guide available.

Purpose & Scope

This repository demonstrates how to integrate Unity Matchmaker with different game server hosting platforms using Cloud Code modules. When using these examples, you're responsible for:

  • Testing and validating integrations for your specific use case.

  • Securing your deployments and managing credentials.

  • Complying with each hosting provider's terms of service.

  • Maintaining and updating your implementations.

Part 1 - Setup

Part 1 - Setup

Requirements

Part 2 - Edgegap: Game Server Hosting & Orchestration

Part 2 - Edgegap: Game Server Hosting & Orchestration

Edgegap: Game Server Hosting & Orchestration

Paste your Edgegap App name and Version in the cloud script code.

Deploy the module

# Deploy cloud code module for your chosen provider
ugs deploy modules/EdgegapAllocator
# Deploy cloud code module for your chosen provider
ugs deploy modules/EdgegapAllocator
# Deploy cloud code module for your chosen provider
ugs deploy modules/EdgegapAllocator

Configure Unity Dashboard

Navigate to the Unity Dashboard:

  • Add the required secrets to your project under Administration > Secrets (refer to the respective module's CONFIGURATION.md for details)

  • Update your Matchmaker to use the new Cloud Code-based allocator under Matchmaker > Queues.

Client Integration

When creating ticket with POST- https://matchmaker.services.api.unity.com/v2/tickets, include public IP in custom data:

{
    "queueName": "basic",
    "attributes": {},
    "players": [
        {
            "id": "Player 1",
            "customData": {
                "player_ip": "8.8.8.8"
            }
        },
        {
            "id": "Player 2",
            "customData": {
                "player_ip": "4.4.4.4"
            }
        }
    ]

{
    "queueName": "basic",
    "attributes": {},
    "players": [
        {
            "id": "Player 1",
            "customData": {
                "player_ip": "8.8.8.8"
            }
        },
        {
            "id": "Player 2",
            "customData": {
                "player_ip": "4.4.4.4"
            }
        }
    ]

{
    "queueName": "basic",
    "attributes": {},
    "players": [
        {
            "id": "Player 1",
            "customData": {
                "player_ip": "8.8.8.8"
            }
        },
        {
            "id": "Player 2",
            "customData": {
                "player_ip": "4.4.4.4"
            }
        }
    ]

Part 3 - Testing

Part 3 - Testing

Maintenance and Support

This repository contains example code for educational and reference purposes. Unity will review updates to this repo but will not guarantee response times for issues or pull requests.

Troubleshooting

If you have issues with the examples in this repository, refer to the documentation of your chosen hosting provider or seek help in the Unity Discussions forums.

Get your Game Online Easily & in Minutes

Start Integrating Now!

Get your Game Online Easily
& in Minutes