How to make a multiplayer game in unity header
Back to top

How to make a multiplayer game in Unity: a practical guide

Dmytro Lunov

Written by

Dmytro Lunov Verified author

Head of Delivery and Program Director at Game-Ace

Dmytro leads Game-Ace delivery teams on game development, art production, game design, MVP prototyping, and Unity and Unreal Engine projects.

Published October 20, 2023 Updated September 9, 2026

Building a multiplayer game in Unity means picking a networking framework (Netcode for GameObjects, Netcode for Entities, Photon Fusion, Mirror, or Fish-Networking), a hosting model (peer-to-peer, listen-server, or dedicated server on Unity Multiplay), and a services layer for Relay, Lobby, matchmaking, and voice. The rest, gameplay, prediction, anti-cheat, sits on top of those decisions.

If you are scoping a multiplayer game in Unity (MMO, party game, PvP, or co-op), talk to Game-Ace.

Why studios keep betting on multiplayer

Multiplayer keeps sessions alive. A well-tuned co-op or PvP loop pulls a player back for months, not the eight hours a single-player campaign might last. That is why publishers, operators, and indie teams still fund it, and why so many teams ask how to make a multiplayer game in Unity instead of shipping a solo title.

Retention numbers back that up. Live co-op and social titles routinely see Day 30 retention several times higher than one-and-done single-player releases, and monetisation scales with hours played rather than box price.

How Unity networking actually works under the hood

A multiplayer game in Unity runs one or more authoritative processes and any number of clients. The authoritative process (a hosted server, a listen-server hosted by one of the players, or a peer that holds authority for a specific object) simulates gameplay. Clients send input, receive state, and reconcile predicted movement against server snapshots.

Netcode for GameObjects and Fish-Networking use a NetworkObject/NetworkBehaviour model with variable replication, RPCs, and ownership. Netcode for Entities pushes the same idea into DOTS: ghost snapshots stream from server to client using delta compression, prediction runs on both sides for owner-predicted entities, and interpolation smooths remote ghosts. Photon Fusion takes a tick-based approach with client-side prediction and lag compensation baked into the core loop, which is why it is often chosen for competitive shooters. Whichever framework you pick, the four decisions that shape everything are: who is authoritative, what is replicated, how prediction and reconciliation work, and how state is compressed on the wire.

Choosing a framework for a multiplayer game in Unity

There is no default. Framework choice depends on genre, target scale, budget, and team experience. Small co-op teams often reach for Fish-Networking or Mirror; competitive shooter teams tend to standardise on Photon Fusion; sim-heavy or entity-dense projects lean on Netcode for Entities.

Framework Best fit Typical CCU per instance Cost model Tooling / notes
Netcode for GameObjects (NGO) Small-to-mid co-op, party games, prototypes Up to ~32 Free (Unity) First-party, Boss Room sample, integrates with Unity Gaming Services.
Netcode for Entities Competitive shooters, large sims, MMO-lite 100s per shard Free (Unity, DOTS) DOTS/ECS, ghost snapshots, client-side prediction. Steeper learning curve.
Mirror Indie co-op, PvP, hobby MMOs Up to ~50 Free / open source UNet successor, mature docs, big community, HLAPI-style.
Photon Fusion 2 Competitive PvP, shooters, racing Up to ~200 (Fusion Shared / Server) Photon CCU pricing Tick-based, prediction + lag compensation, hosted infrastructure available.
PUN2 (legacy) Existing PUN2 titles in maintenance 20-40 Photon CCU pricing In maintenance mode. New projects should pick Fusion 2, not PUN2.
Fish-Networking Indie co-op, small PvP, custom setups Up to ~100 Free / open source Single source of truth, high performance, active maintenance.

Full official framework docs are on the Unity Multiplayer Networking documentation site. Read the specific framework section before committing.

The Unity Gaming Services layer around your netcode

Netcode moves state. Everything else, matchmaking, hosting, voice, connection brokering, lives in Unity Gaming Services (UGS) or a self-built equivalent. Most teams shipping a multiplayer game in Unity today lean on UGS for at least Relay and Lobby.

  • Relay: NAT-punchthrough for peer-to-peer sessions when a dedicated server is overkill.
  • Lobby: session discovery, join codes, quick-match rooms.
  • Matchmaker: skill-based and rules-based matchmaking for larger PvP populations.
  • Multiplay: dedicated game server hosting, region routing, autoscaling for CCU spikes.
  • Vivox: proximity and team voice chat for co-op and competitive titles.

Full pricing and quickstarts: Unity Gaming Services documentation.

How to make a multiplayer game in Unity: a build order that works

Ship the loop, then scale it. That order matters more than the framework. Start with a single scene, two players, and one authoritative process. Verify the loop feels good with 60 ms of injected latency and 2% packet loss. If it breaks there, no framework will save it.

  • Prototype the core loop offline with a NetworkManager and two ParrelSync editors.
  • Layer prediction on owner-controlled entities. Test with Clumsy or Network Link Conditioner.
  • Add Lobby + Relay so real users can join over the internet.
  • Move to a dedicated server (Multiplay or your own Linux fleet) once sessions exceed 8-16 players or PvP fairness matters.
  • Bolt on matchmaking, voice, analytics, and telemetry last.

A common mistake is picking the framework first and worrying about the loop later. That inverts the risk order.

Cross-play, platforms, and account systems

PC platform icon

PC

Mobile platform icon

Mobile

Console platform icon

Console

XR platform icon

XR

A multiplayer game in Unity can target PC, mobile, and console from a single codebase, but cross-play adds real work. Console networking runs through platform-specific SDKs (Sony NP, Microsoft GDK, Nintendo NEX), each with certification requirements. Netcode for GameObjects and Photon Fusion both support console, but transport layers and platform account systems need per-platform wiring. For PC and mobile only, Unity mobile game development patterns cover most of what you need. Add console, and expect several months of certification work per platform plus a first-party account layer.

Anti-cheat and security in a Unity multiplayer game

Client authority is the enemy. Keep gameplay logic on the server for anything that affects scoring, currency, or PvP fairness. Validate every input. Rate-limit RPCs. For competitive PvP, most teams pair server authority with Easy Anti-Cheat (integrated with Unity via a plugin) or BattlEye at the platform layer. For co-op and casual titles, server-side validation is usually enough.

Hosting cost and how to keep it under control

Costs scale with CCU, session length, region count, and how much traffic the server relays. A small co-op session on Relay is cents per hour. A dedicated shooter server at 60 Hz on Multiplay ranges from a few dollars per instance-hour up, depending on machine size and region. For a live PvP title expecting a few thousand daily active players, monthly infra spend usually lands in the €2,000-€8,000 range. Titles targeting hundreds of thousands of DAU move into five figures monthly, and dedicated capacity planning becomes a full-time job.

A multiplayer Unity project from the Game-Ace portfolio

Welcome to Infowar: Shadows of the Grid, a Unity MMORPG by Game-Ace

Infowar: Shadows of the Grid Unity MMORPG by Game-Ace

Infowar: Shadows of the Grid is a Unity MMORPG, where players verify or spread information in real time through a DataLink messaging system, backed by cloud-based matchmaking and Unity's built-in multiplayer tools, with a visible Trust Rating that shapes alliances as players interact.

Talk to Game-Ace about your Unity multiplayer project

If you are scoping a multiplayer game in Unity (MMO, party game, PvP shooter, or co-op), talk to Game-Ace.

When to talk to Game-Ace about a multiplayer game in Unity

Reach out when the multiplayer scope has moved past prototype and the team needs help scaling the loop, choosing between Netcode for GameObjects and Photon Fusion, standing up dedicated servers, or hitting a certification window on console. Game-Ace's custom game development studio fields a 120+ specialist Unity team, working under NDA and full IP transfer through Team Extension, hiring Unity developers directly, or full-cycle game development. For persistent-world architecture specifically, see MMORPG game development.

Related reading:

Frequently searched questions about building a multiplayer game in Unity

Start with the core loop offline in a single Unity project, then add a networking framework (Netcode for GameObjects for co-op, Photon Fusion for competitive PvP, Fish-Networking or Mirror for indie budgets). Prototype with two ParrelSync editor instances, add prediction and reconciliation, then bring in Unity Relay and Lobby for real internet sessions. Move to dedicated servers only when session size or PvP fairness demands it.

For a small team shipping a co-op or party title, Netcode for GameObjects is the safe pick, it is first-party, well documented, and slots into Unity Gaming Services with almost no glue code. Teams that need higher performance or more control often prefer Fish-Networking. Photon Fusion 2 becomes worthwhile once competitive PvP prediction and lag compensation are on the requirements list.

Netcode for GameObjects is Unity's first-party MonoBehaviour-based framework, free and integrated with Unity Gaming Services. Photon Fusion is a paid tick-based framework from Exit Games with built-in client-side prediction, lag compensation, and hosted infrastructure options. NGO fits co-op and small PvP. Fusion fits competitive shooters, racing, and titles that need serious prediction accuracy under packet loss.

Game-Ace starts with a technical discovery: target genre, expected CCU, platforms, and monetisation model. From there the team picks the framework, hosting model, and services stack, then builds a vertical slice with real network conditions injected. Delivery runs through Team Extension, Co-development, or Full-cycle engagement, under NDA and full IP transfer.

Unity Gaming Services bills separately per product. Relay is priced per GiB of relayed traffic; Lobby is priced per session; Multiplay dedicated hosting is priced per instance-hour with pricing that varies by machine size and region. A small co-op title can run under €100 per month at low CCU; a live PvP title with a few thousand DAU typically sits in the €2,000-€8,000 monthly range. Check the current rate card in the Unity Gaming Services docs before committing.

Not out of the box. Netcode for GameObjects and Photon Fusion both support console targets, but each platform (PlayStation, Xbox, Switch) requires its own SDK integration, account layer, and certification pass. Cross-play across PC, mobile, and console is achievable but usually adds several months of platform-specific work per console.

Keep gameplay authority on the server. Anything that affects score, currency, PvP outcome, or progression must be validated server-side, never trusted from the client. Rate-limit RPCs, sanity-check inputs, and log anomalies. For competitive PvP, pair server authority with Easy Anti-Cheat or BattlEye at the platform layer. Casual and co-op titles usually get away with server-side validation alone.

Unreal ships with a first-party replication system tuned for competitive shooters, plus Gameplay Ability System and built-in dedicated server workflows. Unity is more modular: pick Netcode for GameObjects, Netcode for Entities, Photon Fusion, Mirror, or Fish-Networking depending on the project. Unity tends to win for mobile, cross-platform indie, and DOTS-heavy sims. Unreal tends to win for large-scale competitive shooters with heavy visuals.
Average rating 4.8 / 5. Votes: 192
Related posts
Unity 6 preview img Unity 6 for game development: what actually changed Rapid game development with unity preview Rapid game development with Unity: from prototype to build Unity 2d vs 3d bg mob Unity 2D vs 3D: choosing the right dimension for your game The best game engines preview image Best game engines: a working shortlist Unity vs unreal preview image Unity vs Unreal: picking the right engine for your game
Futuristic game robot running through a purple portal
Get in touch
menu
Get in touch
Game-Ace logo loader