Netcode solutions for casual co-op
Target casual co-op multiplayer games with the Netcode for GameObject package. Synchronize scenes and GameObjects data across multiple clients and platforms with either client- or server-authoritative models. Unity helps you optimize your multiplayer games with tools to profile the network, both in Play Mode and at runtime.
Relay, from Unity Gaming Services, is a cost-effective peer-to-peer companion service to scale playtests and build a multiplayer game without having to invest in dedicated hosting.
Netcode solutions for competitive action
Target competitive action multiplayer games with the Netcode for Entities package based on ECS, built for performance and scalability. Build ambitious server-authoritative gameplay featuring prediction, interpolation, and lag compensation.
Manage the costs with a dedicated server build target that can automatically strip assets. Deploy it with Game Server Hosting from Unity Gaming Services, a streamlined approach to maintaining resiliency and scalability in your gaming infrastructure, so you can focus on providing the best experience to your players.
Level up your game with Unity Gaming Services
Build your small-scale cooperative game with Netcode for GameObjects and connect your players with Relay and Lobby.
Plus, access more Unity solutions available to build, manage, and grow your game – battle-tested by the biggest names in gaming.
Get fine-grain control of the transport layer
Unity Transport Package is a netcode-agnostic library that provides a low-level network layer focused on performance and reliability – a modern, secure, and portable transport library that extends the conventional UDP with advanced features such as support for the Unity Relay service, UnityTLS, and pipelines among others.
Both Netcode for GameObjects and Netcode for Entities rely by default on UTP as a transport. However, developers looking to keep fine-grain control over the network can use UTP as a standalone library.
Dive into networking code with netcode samples
Learn more about multiplayer game development by exploring the code of our multiplayer samples.
- Boss Room is a 3D casual co-op game with production-level code – built with Netcode for GameObjects and integrated with Lobby and Relay.
- Galactic Kittens is a 2D co-op space adventure sample built with Netcode for GameObjects and designed to help you learn how to synchronize network objects.
- Network Racing is a fact-paced competitive racing sample – built with Netcode for Entities – that exemplifies client-side prediction, interpolation, and lag compensation.
Learn and create within a community
Someone once said that it’s dangerous to go alone – so we thought you should take this! Dive into our documentation for technical references and content to get started with networking.
Plus, our team is active on the Multiplayer forum, Discord, and GitHub if you have any questions.
Learn more about multiplayer networking
The 8 factors of multiplayer game development
In this guide, we cover the eight factors of multiplayer game development that you need to consider for creating and operating your next multiplayer title.
Enter the Boss Room
Explore Unity’s Netcode for GameObjects, Relay, and the underlying patterns of a multiplayer game in our small scale cooperative RPG Boss Room.
Networking small-scale cooperative games
Discover how Breakwaters, an upcoming indie game, chose their model so you can learn how to approach networking a small-scale cooperative game.
Netcode Fact or Fiction
The term “netcode” can come with a bad rap from players – it’s often what’s blamed for latency and bad multiplayer experiences. Learn fact from fiction in this blog that tackles common netcode misconceptions.
Frequently asked questions
Yes, Unity’s netcode solutions support a host/listen-server model where one client acts as the host and other clients connect to it. Learn more here.
With the most recent version of Transport, which is used across all our multiplayer solutions, we support all platforms, including WebGL. Feel free to review our roadmap to vote on or share your ideas here.
Netcode for GameObjects is production-ready as of September 20, 2022, and Netcode for Entities is in pre-release as of the 2022.2 Tech Stream.
Our current plan of record is to keep both netcode solutions separate from the core Unity real-time development platform. If plans change, our roadmap will be the first place to reflect that.
Netcode for GameObjects will be available in versions 2020.3, 2021.3, 2022.1, and 2022.2
Netcode for Entities will be available in versions 2022.2.
Netcode for GameObjects and Transport have seamless integration with Unity Relay.
For Game Server Hosting (Multiplay), the process to get them setup together is currently manual – however, our team is currently working on making this DGS workflow optimal and seamless across all our solutions.
Absolutely, both in the SDK and the docs. We’re excited to be able to share this journey with the community, and we will also make other different flavors of contributions available, for instance, RFC processes to discuss design decisions.
Both of our multiplayer solutions support a dedicated game server model. To create a dedicated game server, you can change your build target to a dedicated server, build your project normally, then upload that final build to a game server hosting service or your own server hardware.
Our documentation site is full of learning resources and articles to help you get started. If you have any other questions, you can ask our team directly on Discord.