LogoLogo
edgegap.comDashboard
  • 📘Learning Center
    • Getting Started
    • Unity Games
      • Getting Started - Servers
      • Developer Tools
    • Unreal Engine Games
      • Getting Started - Servers
      • Developer Tools
    • Matchmaking
      • Getting Started
      • Matchmaker In-Depth
      • Ping Beacons
    • Advanced Features
      • Apps and Versions
      • Deployments
      • Managed Clusters
  • API Reference
    • Dedicated Servers
    • Integration
    • Matchmaking
    • Peer to Peer
  • Release Notes
  • 📚Documentation
    • Sample Projects
      • Unity Netcodes
        • Unity NGO
        • Photon Fusion 1
        • Photon Fusion 2
        • Mirror
        • Mirror WebGL
        • Fishnet
        • Fishnet WebGL
        • Photon Bolt
      • Unreal Top-Down Sample
      • NuxtJS
      • Ruby On Rails
      • Unity Lobbies
      • Unity Matchmaker
    • Tools & Integrations
      • Container
        • What is Docker
        • Your First Docker
        • SSH in Your Container
        • External Registries
          • Docker Hub
          • AWS ECR
          • GCP GCR
          • Gitlab registry
      • Deploy from Nakama
      • EOS Lobby Integration
      • Switch From Gamelift
      • Switch From Multiplay
      • Playfab Bridge
    • Deployment
      • Endpoint Storage
        • How to Save Logs
        • Upload File to Deployment
      • Webhooks
    • Application
      • Command and Arguments
      • 1:1 Port Mapping
    • Session
      • How They Work
      • Application Version Configuration
      • Manage Request
      • Selectors Filtering
    • Fleet
      • Fleet Policy
      • Policy Filter
      • Linking Version
      • Fleet's Deployment
    • Container Registry
    • Distributed Relay
      • Matchmaker/Lobby
      • Relay Edgegap API
      • Transport Samples
    • Lobby
      • Lobby Service
      • Functions
    • Glossary
    • SLA Terms
Powered by GitBook
LogoLogo

Connect with Community

  • Discord
  • Linkedin
  • X

Read More

  • Release Notes
  • Blog
  • Enterprise
  • Legal
  • edgegap.com

© 2025 Edgegap

On this page
  • Remove references to Multiplay from project
  • Containerize your game server
  • Push your container on a repository
  • Create an Application on Edgegap

Was this helpful?

  1. Documentation
  2. Tools & Integrations

Switch From Multiplay

PreviousSwitch From GameliftNextPlayfab Bridge

Last updated 2 months ago

Was this helpful?

If you are looking to switch from using Unity Multiplay to Edgegap, the following simple steps will get you running in no time. Before getting started, we expect that:

  • You currently use Unity Multiplay;

  • You currently have a working game server build on Multiplay;

  • You already and an application on Edgegap.

Remove references to Multiplay from project

The first step to switch to Edgegap is to remove the code that initializes the Unity Gaming Services for your server, which should resemble the following:

Unity (C#)

...

public bool alreadyAutoAllocated = false;

void Awake()
    {
        InitializeUnityServices();
    }

private async void InitializeUnityServices()
    {
        if (UnityServices.State != ServicesInitializationState.Initialized)
        {
            InitializationOptions initOptions = new InitializationOptions();
            await UnityServices.InitializeAsync(initOptions);

#if DEDICATED_SERVER
            MultiplayEventCallbacks multiplayEventCallbacks = new();
            multiplayEventCallbacks.Allocate += MultiplayEventCallbacks_Allocate;
            var serverConfig = MultiplayService.Instance.ServerConfig;

            if (serverConfig.AllocationId != "")
            {
                MultiplayEventCallbacks_Allocate(new MultiplayAllocation("", serverConfig.ServerId, serverConfig.AllocationId));
            }
#endif

        }
        else
        {

#if DEDICATED_SERVER
            var serverConfig = MultiplayService.Instance.ServerConfig;

            if (serverConfig.AllocationId != "")
            {
                MultiplayEventCallbacks_Allocate(new MultiplayAllocation("", serverConfig.ServerId, serverConfig.AllocationId));
            }
#endif

        }
    }

    private void MultiplayEventCallbacks_Allocate(MultiplayAllocation obj)
    {
        if (alreadyAutoAllocated)
        {
            return;
        }

        alreadyAutoAllocated = true;
        var serverConfig = MultiplayService.Instance.ServerConfig;
        ushort port = serverConfig.Port;

        //Assign port to your Network Manager's Transport component;

        //Start the server;
    }
...

You should also unlink your project from the Unity dashboard under Edit -> Project Settings -> Services if your game is made with Unity.

Containerize your game server

The second step towards switching to Edgegap is to containerize your game server. You can follow the following guides:

If you created a build version on the Unity Dashboard with a container image, you may need to modify your Dockerfile. Most notably, you will need to assign a game port value of your choice to your Transport component in the project, and expose that port in the Dockerfile.

Push your container on a repository

Create an Application on Edgegap

You need to add the same port as your Dockerfile to your app version, as well as link the image you just pushed on a repository in the Container section. This is also where you can add some Environment Variables specific to your app version, much like the Configuration Variables in the Build Configurations on Multiplay.

Setting up fleets

Edgegap also offers an optional feature similar to Multiplay's fleets, if that is something from before you switched to Edgegap that you would like to keep using.

It is higly suggested that you do not use the Autodeploy options with these sessions, as it will interfere with the fleet settings. It is also suggested that you set up an Empty Time To Live in order for the deployments to be deleted automatically.

You will have to push your container on a repository. You can use Edgegap's or any other option.

Now that your container is on a repository, you will have to on Edgegap. This Application will represent your game sever.

With only these settings, you can now your server on demand for your players!

Currently, our fleets are only supported with session-based applications, so when creating your app version you will need to set up either a Seat or Match session type, found under Advanced Settings. You can find more information on sessions .

Once you have a compatible app version ready, you can go on to on Edgegap. Once the fleet policies and filters are set up, you can link your app version to it, then enable the fleet. This will automatically create deployments following your setup. Those deployments will be tagged with both the fleet name and policy name, which you can use to filter the available servers to your players.

📚
created
deployed
Unity
Unreal
private repository
create an Application
deploy
here
create a Fleet