Megacity Metro is Unity's multiplayer shooter sample: up to 150 players fly through a city in one match, built with Netcode for Entities (DOTS/ECS). Upstream, it runs on Unity Gaming Services. Edgegap's fork runs its dedicated server on Edgegap and finds matches with the Edgegap matchmaker.
The game's netcode doesn't change: same server-authoritative Netcode for Entities, same prediction and lag compensation. The fork adds a few Edgegap files and two small hooks. With the Edgegap settings left empty, the game behaves exactly like upstream.
Players press Find Match, the matchmaker starts a dedicated server, and players who search later join that running server through backfill, up to 150 per server. The server stops its own deployment when nobody is playing.
Mobile status, 21 October 2026: phones join through Find Match, because mobile release builds hide the direct Connect option. That matchmaker path works and was tested with Windows clients. Android and iOS builds have not been tested on Edgegap yet.
Edgegap's network spans 615+ Edge Cloud locations (learn more). Each server is deployed to the best available location for its players and billed only while it runs.
Clone the sample: Megacity Metro fork on GitHub
Full guide: add Edgegap to your own Unity game with the Unity Engine integration guide
Platforms: Linux dedicated server. Tested clients: Windows. Android, iOS and macOS are supported by the upstream game but not tested on Edgegap yet. Original game by Unity Technologies, under the Unity Companion License.
How it works
A player presses Find Match. The client sends a solo ticket to the Edgegap matchmaker, with no Unity Gaming Services sign-in.
The matchmaker groups players into profile
metro(one team of 2 to 150) and starts an Edgegap deployment for the match.The server boots, listens on UDP port 7979 and skips UGS sessions. Each client gets the server's IP and external port, connects, and sends its ticket ID so the server can count seats.
While seats are free, the server keeps backfill tickets open. A player who searches later is sent to this running server instead of a new one.
When nobody is left, the server closes its backfills and stops its own deployment, which ends billing.
What the fork changed:
Path | What it does |
|---|---|
| Reads what Edgegap injects into a deployment, and the client's direct-connect target. |
| Server: stops the deployment when nobody joins or everyone has left. |
| Client: queues a solo ticket and returns the server's IP and port. |
| Server: keeps backfills open while seats are free, and matches connections to tickets. |
| Matchmaker URL, auth token, profile and backfill limits, shared by client and server. |
| Hook: on Edgegap, skips UGS sessions. |
| Hook: Find Match uses the Edgegap matchmaker, or connects straight to a server. |
| Tools → Edgegap → Build Linux Dedicated Server, also from the command line. |
| Server image and matchmaker configuration. |

Unity's Megacity Metro, a Netcode for Entities shooter, with its server on Edgegap.
1. Before you start
A free Edgegap account. No credit card is needed to test.
Unity 6000.1.0f1 with Linux Build Support (IL2CPP), Linux Build Support (Mono) and Linux Dedicated Server Build Support, plus the module for your client platform (Windows Build Support (IL2CPP) for the tested client).
Docker Desktop, running.
Git LFS, installed before you clone: the project holds about 415 MB of LFS content. Plan time: Unity says the first clone, the first project open and the first build can each take 20 to 50 minutes.
Clone the fork. Download as ZIP doesn't work for this project.
Git: Unity needs a Git client (2.14.0 or newer) on your PATH to install packages from a Git URL, such as the Edgegap plugin. macOS usually has one already (Xcode Command Line Tools); on Windows, install Git.
2. Build the server and push the image
Close the project in the Unity Editor, then build the Linux dedicated server from the project root:
Unity -batchmode -quit -buildTarget Linux64 -standaloneBuildSubtarget Server -projectPath . -executeMethod EdgegapServerBuild.Build -logFile build.log
Keep -buildTarget Linux64 -standaloneBuildSubtarget Server: without them, the Entities content build fails with "Unable to build with the current configuration". You can also use Tools → Edgegap → Build Linux Dedicated Server in the Editor.
The build lands in Builds/EdgegapServer/ (about 3.4 GB, mostly debug files). The fork's .dockerignore leaves those out, so the image is about 537 MB.
Log in with the username and token from the Container Registry page, then build and push with a new tag each time:
docker login registry.edgegap.com
docker build --platform linux/amd64 -t registry.edgegap.com/<project>/megacity-metro:<tag> .
docker push registry.edgegap.com/<project>/megacity-metro:<tag>
3. Create the app version
In the dashboard, create the application megacity-metro and a version for your image:
Image
<project>/megacity-metro, your tag, with your registry username and token. Without them, deployments fail to pull the image.1 vCPU and 2 GB, the tested size. An idle server used about 18% CPU and 323 MB.
One port: name
gameport, 7979, UDP.
Optional environment variables on the version: EDGEGAP_FIRST_PLAYER_TIMEOUT_S and EDGEGAP_EMPTY_TIMEOUT_S (self-stop timers), EDGEGAP_MAX_PLAYERS and EDGEGAP_MAX_OPEN_BACKFILLS (backfill limits), and UNITY_COMMANDLINE_ARGS for extra server arguments.
4. Test a server with a desktop client
Before adding the matchmaker, prove the server works. Deploy the version from the dashboard, near you. The server log shows Running on Edgegap ... skipping UGS sessions.
Start a desktop client with the deployment's host and external port (on the deployment page; it isn't 7979):
<client executable> -edgegapConnect <host>:<external port>
Or set EDGEGAP_CONNECT=<host>:<external port> before launching it. The host can be the IP or the FQDN. With a direct-connect target, the client skips UGS sign-in and needs no UGS project. The server logs [Edgegap] Connected players: 1 when you join.
Direct connect is for desktop testing only: mobile release builds hide the Connect option, so phones use Find Match (step 6).
For a quick Windows test client, build with Mono instead of IL2CPP (the IL2CPP Master build took about 40 minutes and 12 GB of RAM):
Unity -batchmode -quit -projectPath . -executeMethod EdgegapServerBuild.BuildClient -edgegapClientTarget win64 -edgegapClientMono -buildTarget Win64 -standaloneBuildSubtarget Player -logFile client.log
It lands in Builds/Client/win64-mono/. Keep -standaloneBuildSubtarget Player after a server build, or the build fails with "script class layout is incompatible".
Stop the deployment when you're done. The free tier runs one deployment at a time.
5. Add it to your own Netcode for Entities game
The fork is a working reference: your coding agent can copy its tested files instead of writing them from scratch. Five changes make a Netcode for Entities game run on Edgegap:
The server skips UGS on Edgegap. When the
ARBITRIUM_REQUEST_IDvariable is set, the server starts without UGS sessions (ServerManager.cs,EdgegapEnvironment.cs).The server stops itself. A server-world system calls
ARBITRIUM_DELETE_URLwhen nobody joins or everyone has left (EdgegapServerLifecycleSystem.cs).Find Match uses the Edgegap matchmaker. The client queues a ticket with the Edgegap Unity SDK and passes the returned IP and port to the game's existing connect flow (
EdgegapMatchmakerClient.cs,MatchMakingConnector.cs).Running servers keep filling. A server-world system keeps backfills open while seats are free, and clients send their ticket ID over an RPC after connecting (
EdgegapBackfillSystem.cs,EdgegapTicketRpc.cs).A Linux server build and an image.
Assets/Edgegap/Editor/EdgegapServerBuild.csbuilds the server; the fork'sDockerfileand.dockerignorekeep debug files out of the image.
Then create the app version and matchmaker as in steps 3 and 6.
With your agent:
"Load the edgegap skill, then edgegap-unity. My game uses Netcode for Entities. Using github.com/edgegap/netcode-game-sample-unity-dots-ecs-mobile-megacity-metro as the reference, add a server-world system that stops the Edgegap deployment when the server is empty, make Find Match queue with the Edgegap matchmaker and connect to the returned address, add server backfill with ticket IDs sent over an RPC, and build the Linux dedicated server into the fork's Dockerfile."
Edgegap's skills have no Netcode for Entities templates yet: edgegap-unity covers the Unity workflow, and the fork's ECS systems are the reference for the netcode parts.
For each step in detail, by hand, see the Unity Engine integration guide.
6. Find Match with the Edgegap matchmaker
This is the path phones use. It was tested with Windows clients on 21 October 2026, not yet on Android or iOS.
Set
application.versioninmatchmaker-config.jsonto your app version. Profilemetrois one team of 2 to 150 players. Two players searching together get one server about 10 seconds after they queue, and a lone player gets one after 30 seconds. That suits testing; raise the minimum for real matches.In the dashboard, open Matchmaker, select Create Matchmaker, upload
matchmaker-config.json, then select Create and Start.When it's ONLINE, copy the API URL and Auth Token into
Assets/Resources/EdgegapMatchmakerSettings.asset. The Auth Token is safe to ship in clients: it gives no access to your Edgegap account.Rebuild the server and the clients. Both read this asset: clients to find matches, the server to create backfills. Then push a new tag and create a new app version.
Press Find Match in a client. The status goes "Searching...", "Match found, starting server...", then the client connects. Batch-mode clients (-batchmode -nographics) matchmake on their own.
Backfill (join in progress). Every ticket carries a backfill_group_size attribute: clients send ["new", "1"] (a new match, or one seat on a running server), and the server sends ["1"]. The server gives each matched player 60 seconds to connect, keeps up to 3 backfills open while seats are free, and closes them all before it stops.
Self-stop. The server stops its deployment 300 seconds after start if no player ever connected, or 60 seconds after the last player left. Players who are matched but still connecting keep it running.
On the free tier, the matchmaker stops 3 hours after each start; restart it from the dashboard (its URL and token stay the same). When you ship a new server build, update application.version in the matchmaker (Stop, Edit, Start).
Known limits
Phones are not tested yet. Android and iOS builds should reach Edgegap through Find Match, the path tested with Windows clients, but no phone has joined an Edgegap server yet. A windowed desktop playtest hasn't been done either; tested clients ran headless.
No ticket validation. The server logs a connection whose ticket it wasn't given, but still lets it in.
Backfills outlive an outside stop. If a deployment is stopped from the dashboard, the API or its max duration, the server exits without closing its backfills. For up to 5 minutes, they can send a player to the stopped server; that player's connection times out, and the next Find Match works.
Vivox and UGS sign-in are untouched. The Edgegap paths don't use them, and the in-game Connect mode's session browser still lists UGS sessions.
What was tested
Tested on Edgegap with Unity 6000.1.0f1 and a 1 vCPU / 2 GB app version on 7979/UDP. Clients were Windows builds, run headless (-batchmode -nographics).
20 October 2026, direct connect: a Windows IL2CPP client connected with
-edgegapConnectand the server logged the player joining. The deployment stopped itself with no player (1502 s, timeout set to 1500 s) and about 60 s after the client quit.21 October 2026, matchmaker (free tier, profile
metro): two Windows clients (Mono builds) queued together, gotMATCH_FOUNDthenHOST_ASSIGNEDfor the same deployment, and both connected. A third client went fromSEARCHINGstraight toHOST_ASSIGNEDon that running deployment through a backfill, and joined. After all three quit, the deployment stopped itself.Locally (server in Docker, mocked Edgegap variables, real matchmaker): when no matched player connected within 60 s, the seats were released and the backfills closed.
Not tested: Android, iOS and macOS clients.
Frequently Asked Questions
Questions about running Unity's Megacity Metro and Netcode for Entities on Edgegap.
Can Netcode for Entities run on Edgegap dedicated servers?
Yes. Build the game for the Linux Dedicated Server target and run it in a container on Edgegap. Megacity Metro's server runs on Edgegap with its netcode unchanged: the fork only adds a few Edgegap files and two small hooks.
Does the Megacity Metro sample work on mobile with Edgegap?
Not tested yet. Phones join through Find Match, which now uses the Edgegap matchmaker and works with Windows clients. Android and iOS builds haven't joined an Edgegap server yet.
Can players join a Megacity Metro match that already started?
Yes, through backfill. While a server has free seats, it keeps backfill tickets open with the Edgegap matchmaker, so players who search later join it, up to 150 per server.
Do I still need Unity Gaming Services?
Not for hosting or matchmaking. On Edgegap, the server skips UGS sessions, and Find Match and direct connect skip UGS sign-in. Vivox voice chat still uses UGS.

Clients
Learn more from clients who integrated Edgegap
31 case studies are available from studios that moved to Edgegap from another platform.

A Flawless Global Launch for Rivals of Aether 2
Aether Studios
Learn how Aether Studios quickly added Edgegap and delivered flawless launch & post-launch to their community.
Case Study

Overcome Latency Introduced by VR’s use of WiFi in Competitive Multiplayer
Halfbrick Studios
Discover how Halfbrick successfully launched & maintains a multiplayer-focused Early Access on META Quest's VR platform.
Case Study

MENA’s Social App Adds Online Games
WOLF
Learn how the highly popular MENA-region social app added matchmaking & multiplayer games orchestration easily to WOLF Qanawat.
Case Study

Hybrid Orchestration Keeps Kickoff Tactics Ready for Any Traffic
Birch Games
How hybrid orchestration helped Birch Games handle traffic, pairing egress-free Fleets with the regionless cloud.
Case Study

7 Days Blood Moons
The Fun Pimps & iLLOGIKA
Learn how Illogika dramatically reduced server costs & ensured the online experience the 7 Days to Die franchise expects.
Case Study

Authentic Online Warfare Requires the Ultimate Orchestration
Highwire Games
Learn how Highwire's need for performance required orchestration only Edgegap can deliver.
Case Study

22,000 Reviews, 4.8 Stars, and Infrastructure That Scaled Automatically
Sinn Studios
How a simple, Slack-supported integration got Sinn Studio's hit VR title online fast and keeps it there.
Case Study

Dynamic Server Orchestration
Under NDA - AAA Studio
Discover how one the world's biggest AAA studio improved its peer-to-peer multiplayer experience through edge computing.
Case Study

Near Zero Latency for AAA Fighting Game
AAA Studio - Under NDA
How an unannounced project delivered the lowest lag possible and improved fairness in its 1v1 game.
Case Study

Play Gods with Multiplayer Physics
Squido Studio
Learn how Squido uses Edgegap's highligh optimized game servers to deliver mind-bending & chaotic VR gameplay.
Case Study

A Fully Managed Solutions that Saves Time for Indies Multiplayer VR Horror
Dirty Pearl Studios
Discover how Dirty Pearl Studios saved development time thanks to Edgegap’s easy integration and automated orchestration alongside its Nakama integration.
Case Study

Instant Global Server Deployment for Collaborative XR Medical Education
AlensiaXR
How AlensiaXR uses Edgegap to deliver low-latency, always-available shared anatomy sessions to medical students worldwide.
Case Study

The Lightkeepers: A VR Social Co-op Game with Dedicated Servers
Spectral Games
How Spectral Games used Edgegap Matchmaking and Server Browser to launch dedicated servers for its VR social lobby, with no prior server experience.
Case Study

Fast & reliable deployments worldwide for PvPvE challenger Gravebound
Crater Studios
How Edgegap’s orchestration and matchmaking helped Crater Studios dramatically helped a small them focus on gameplay instead of infrastructure.
Case Study

Rapid Scaling of Web Metaverse
Hiber
Learn how Hiber eliminated the guesswork out of its server capacity planning with Edgegap.
Case Study

High Hardware Requirements & Custom Game Server Pools
Alderon Games
Learn how Alderon Games instantly leverages a custom pool of game servers across multiple providers worldwide for its popular MMO.
Case Study

Easy Integration for Indie Devs
WhaleFood Games
Read how WhaleFood Games "kicked out" its netcode issues with Edgegap.
Case Study

Cutting-edge tech that powers South-East Asia’s first-ever eSports title.
Anantarupa Studios
Learn how Edgegap transformed South-East Asia’s gaming landscape streamlining complex infrastructure and cutting-edge tech with one seamless solution.
Case Study

One Strike. Global Reach.
Triple Hill Interactive
How Triple Hill Interactive leverages Edgegap's orchestration to deliver low latency and improve fairness in a genre where every millisecond counts.
Case Study

Fast-paced Team Battle Royale... with Gun-totting Animal Plushes!
SANDYFLOOR
Discover how a Korea-based Indie Studio launched it multiplayer worldwide.
Case Study

Mobile Horse Racing Goes Global with Instant, Cost-Efficient Servers
Mirai Labs
How Mirai Labs powers Pegaxy Blaze's worldwide multiplayer races with just-in-time server deployment and fractional vCPU to keep cost per player low.
Case Study

Server Management & Distribution
Matrioshka Games
Read how Matrioshka Games were able to ship a Battle Royale in early access with limited ressources.
Case Study

At my Signal, Unleash Hell!
TyGames
Discover how Indie studio TyGames immerses players in third-person gladiatorial combat multiplayer.
Case Study

Instant Worldwide Orchestration
Soliton Interactive
Discover how Soliton Interactive did the impossible… Ship it's first playable as multiplayer!
Case Study

Competitive play with server-side physics ensures ideal sub-50 ms latency
NS7
Discover why solely Edgegap could enable an indie studio to deliver on its vision for a AAA-quality F2P sports gameplay through server-side physics and authority.
Case Study

Regional Deployments for iGaming
X1 Contra 1
X1 Contra 1 delivers real-time PvP casual games to its Brazilian player base through cost-effective hosting & regional deployments, ensuring data and legal compliance.
Case Study

Pay Only When Players Play: Affordable Multiplayer Infrastructure
Meltdown Interactive
How Edgegap helped indie developer Meltdown Interactive Media solve cost-effective scaling and matchmaking without the complexity, so they could focus on building the game.
Case Study

One Edgegap platform, three very different networking profiles
Warped Games
How Warped Games runs a social hub, real-time co-op, and turn-based co-op, all on the same Edgegap deployment API and the same container pipeline.
Case Study

Pool Live Tour Max
RETA Games
Case Study

Korea’s Web3 POP Extraction Shooter Goes Global, Instantly
NDUS Entertainment
How XOCIETY easily added Edgegap orchestration & integrated custom matchmaking working alongside Edgegap Ping Beacons to optimize latency.
Case Study

Multiplayer in Every Dimension
Arcadia.tv
Discover how Arcadia.tv uses Edgegap's edge network to deliver an innovative, team and location-based athletic VR sport.
Case Study

F2P Mobile Fighter Cuts Infrastructure Costs With Just-in-Time Servers
Game Changers Worldwide
How Game Changer Worldwide hosted Rumble Rush's real-time 3v3 PvP globally on mobile.
Case Study
Key reasons why they chose Edgegap
Discover the impact of Edgegap's automated game server orchestration for a flawless multiplayer experience.









