Search Unity

Before joining Unity, members of the networking team worked mainly on MMOs such as Ultima Online, Lord of the Rings Online, Dungeons and Dragons Online, Marvel Heroes, Need for Speed Online and World of Warcraft. We have a lot of passion for and a ton of experience with making multiplayer games, technology and infrastructure. The Unity vision was known to each of us and was always very appealing. When the chance to do something truly great like specializing the Unity vision with multiplayer came up, it was impossible to decline.  So we all left our former jobs and joined Unity to make this vision happen. Right now, we’re working hard to deliver these tools, technology and services so anyone can make their own dreams of a multiplayer game a reality.

This is of course a pretty big undertaking, but, like I said, we have all done this before, and we are all very driven to do it again (because it’s really, really cool!). The way we have tackled this is to divide our overall goal into phases which should be familiar to Unity developers. We take the approach of releasing a Phase 1, getting feedback from our users, adding that feedback to our work to make the next phase even better and repeating that cycle.

For UNET, Phase 1 is what we call the Multiplayer Foundation – more on that in a bit. Phase 2 is where we build on Phase 1 to introduce server authoritative gaming with what we call the Simulation Server, we’ll blog about this later. Finally, Phase 3 is where we want to introduce the ability to coordinate multiple Simulation Servers through a Master Simulation Server. As usual, exact dates for this are not possible and of course things can change, especially after gathering feedback from our users. But we can say that Phase 1 will be part of the 5.x release cycle and Phase 2 is in R&D right now.

So what do we mean by the Multiplayer Foundation for Phase 1? The main features are as follows:

  • High performance transport layer based on UDP to support all game types

  • Low Level API (LLAPI) provides complete control through a socket like interface

  • High Level API (HLAPI) provides simple and secure client/server network model

  • Matchmaker Service provides basic functionality for creating rooms and helping players find others to play with

  • Relay Server solves connectivity problems for players trying to connect to each other behind firewalls

We had some inherent limitations with our legacy system that we needed to address and with our greater goal in mind it became clear that we needed to start from scratch. Since our goal is to support all game types and any number of connections, we started with a new high performance transport layer based on UDP. While it’s true that a lot of games are done quite well with TCP, fast action games will need to use UDP as TCP holds the most recently received packets if they arrive out of order.

From this new transport layer we built two new APIs. We have a new High Level API (HLAPI) which introduces a simple and secure client/server networking model. If you’re not a network engineer and you want to easily make a multiplayer game, the HLAPI will interest you.

We also wanted to address feedback we’d received on our old system: some users needed to have a lower level access for greater control. So we also have the Low Level API (LLAPI) which provides a more socket-like interface to the transport layer. If you are a network engineer and want to define a custom network model or just fine tune your network performance, then the LLAPI will interest you.

The Matchmaker service is used to configure rooms for your multiplayer game and get your players to find each other. And finally the Relay Server makes sure your players can always connect to each other.

We know from our prior experiences that making multiplayer games involves a lot of pain.  So the Multiplayer Foundation is a new set of easy to use professional networking technology, tools and infrastructure for making multiplayer games without this pain. To even get started, I think it is fair to say that making a multiplayer game requires a fair bit of knowledge of networking and protocols. You either overcome the painfully steep learning curve yourself or find a network engineer to join you.  Once you’ve gotten past that, you then have to solve the problem of getting your players to find each other.  And once you’ve solved that problem, you now have to deal with getting players to be able to actually connect with each other, which can be troublesome when they are behind firewalls with NAT.  But then if you’ve solved all of that you’ve created a bunch of associated infrastructure which wasn’t game development and probably wasn’t fun. And now you have to worry about dynamically scaling your infrastructure which usually takes a bit of prior experience to get right.

Our Phase 1 addresses each of these pain points. The HLAPI eliminates the need for a deep knowledge of networking. But the LLAPI is there if you are a network engineer and you want to do things your own way. The Matchmaker solves your problem of getting your players to find each other. The Relay Server solves your problem of getting players to be able to connect to each other. And we also solved your problem of the associated infrastructure and dynamically scaling it. The Matchmaker and Relay Server live in Unity’s Multiplayer Cloud. So not only do the physical servers scale up and down based on demand, but the processes scale up and down as well.

We are very excited about UNET and are eager to share more details. Over the next few weeks we’ll follow up with more blogs from the rest of the team.  We would love to hear what you think, and we can’t wait to see what you all make with this in the future.

73 replies on “Announcing UNET – New Unity Multiplayer Technology”

[…] a general overview of the UNET system here, or read on to learn about the UNET transport layer […]

Hi Erik Juhl,

Great info on multiplayer technology. I’ve started becoming proficient myself in multiplayer technology and have actually been selling video tutorials to earn some additional
revenue.It’s pretty easy to do and I thought you might be interested so check it out when
you get a chance, it’s free to sign up


“The Matchmaker and Relay Server live in Unity’s Multiplayer Cloud”

…. So much for empowering the developers. If they want their own matchmaking server, they’ll have to code it themselves anyway since I’m sure that API won’t be accessible. I bet they’ll even make it a paid service. And of course without this you’ll have to do your own NAT hole punching solution too, if you don’t want to have to deal with a bunch of port-forwarding/firewall support. Oh well, at least their vision sounds good.

[…] Unity have announced UNET, a revamp for networking functionality of the toolset. The project aims to reduce the amount of time it takes to implement multiplayer in a project. The first component of the new functionality will debut sometime in the Unity 5 update cycle, this will include new networking APIs and a matchmaking service. […]

Please let us all know as soon as anything is ready to “play” with – even just a beta (beg!). I’d like to add this to a networking chapter of my book! Unity rocks!

This is the news i have been waiting for and you are about to make my life even simpler.

I have been fighting with creating exotic and creative solutions to the network and soon i wont have to ……YAY

I’m right about to get started with networked multiplayer games, I’m really glad I got to read this before starting. Now I’ll just wait for your new documentation and part from there.

Are you planning on making available any documentation site for this so that one can start learning it right away? Or do we have to wait for the release of Unity 5?

Also are we gonna be able to try this tech on the first release of Unity 5 or are we to wait until a particular sub-version of the Unity 5 series? Cause I wanna start learning right away! = D

Wonderful news! Many developers have been waiting for it for rather long time already – happy it’s finally here adn would be interested in pricing

@MADMAX we support up to 255
@DANIEL we cannot prevent mitm attack as we do not have trusted server (so we leave it to user now), but we are going to use DH key exchange during connection establishing to support encrypted channels. Using some sort of HMAC for packets signature is still under discussion.

Very nice! It’s much too late rather!
I am planning to make a cross platform malti-player game, so UNET will be a useful tool that?

Any plans how you’re going to handle networked physics? Just do the physics only on server side or on client side as well?

This sounds amazing! I can’t wait! Just wondering, are you guys considering any kind of security measures built into the APIs or is this something you will leave up to the dev? I understand you can’t expect the API to do everything and validation and such will need to be done by both server and client to ensure the data that is brought in is accurate. If you are putting some security in there, would this be all HLAPI stuff and then LLAPI would be without it? Just curious, but sounds amazing guys! :)

[…] Si vous désirez en savoir plus venez découvrir plus en détail le projet ici […]

[…] very interested and slightly excited by the recent announcement on the Unity blog that there would be potential implementation of multiplayer capability into Unity.  In particular, […]

Actually, I do have one other thing I would love to see in UNET.
It would be great if we could have some mechanism for tying into the matchmaking system. That is, if I could have a custom backend server for my game which can interface with the matchmaking system for launching new servers and connecting players together. Reason being, I would love to have a good amount of control over things like having Xbox LIVE-style “parties” where a group of players is grouped together in matchmaking, game invites, etc and also other things like making sure the user is actually logged in before allowing them to start or join a multiplayer match.

Both RakNet and Lidgren limit you to 32 sequential unreliable channels. It would be great if you would allow more since my network architecture, which I am using for an RTS type game, needs many more.

[…] équipes du moteur Unity ont annoncé sur leur devblog le développement d’un nouvel outil nommé UNET – pour « Unity […]

too late , all that is already done … :)

Only this boring socket policy forbids to do your custom peer2peer layer…

Don’t forget uPnp support :)

Great news! Almost finished working on the Multiplayer fxnality on my Android game. Unfortunately I use the free version so that meant no .net sockets aka no networking code on mobile. Thank’s for the good old AndroidJavaObject though; ended up having to do it through Java Sockets. This is Good news, though. I hope a good chunk of it comes in the free version so I won’t have to go through so much to avoid paying 3000 bucks ;-)

Really looking for a timeline on this, am going to start multiplayer coding in the next few months for my game. Wondering if I should wait a bit longer if this is a within 4 months sort of thing.

This is incredible news. Unity’s built-in networking isn’t bad, but it has its shortcomings. I want to be able to build an authoritative game server that’s lightweight while also leveraging the power of Unity’s built-in collision, terrain, etc. It sounds like this framework will help solve exactly that problem.

Please please please be very transparent about timelines if you can. It can make a huge impact on how people decide to proceed on their projects and to a greater extent… their lives..

No pressure though :)

What I need as a developper is a clear implementation path which enables me to drive my game and have authoritative code path to prevent tampering. If making both those things and I dont have to worry about player count and scaling in a single scene, it will be like a total revolution code wise ! Enable us to focus on gameplay, not tech !

[…] The actual process that Unity is using to implement UNET sounds very complicated and technical- if you feel up to it, make sure to check it out on their website. […]

I struggled with multiplayer networking for years, until I eventually compiled my lessons into a chapter in Game Engine Gems 2, “Believable Dead Reckoning for Networked Games”. It’s no-kidding hard.

A recent Gamasutra article (link – ) summed networking up nicely: “Online multiplayer is the most complex part of game development there is,” says developer Joost van Dongen, bluntly. “Adding online multiplayer roughly doubles the programming time needed to make a game, especially if this is the first time for a developer.”

Send a PM with your email to forums user Gigiwoo2, if you think having a PDF of the chapter would be useful.

I’d love to hear more about the plans for the matchmaking service. Will this include a platform-agnostic way for players to build friends lists and invite each other to play (for example, inviting someone who’s not logged in, like with Game Center invitations)?

[…] You can find more details on UNET here. […]

@NANITY There are mechanisms in the HLAPI for RPC calls, which work properly with a “Host” as you call it. There are “Commands” – which implement a secure command pattern with the HLAPI’s authoritative server model, “ClientRPCs” – which go in the other direction, “SyncVars” – which automatically synchronize script variable state, “Transform Synchronization” – which is highly configurable, and “SyncEvents” – which support modular scripting interfaces. These all use a code-generation system that is integrated into the Unity build pipeline, that generates Reflection-less code paths for these operations. More details in upcoming blog posts.

That’s fantastic .. I’m glad this will be part of the core Unity application and not a separate product. Having some parts of it as pro features and others as free is fine and in line with the existing Unity business model.

@NANITY , “Hosting a local game by being a server and a client at the same time.” we support fine, API is different, I guess we can refer to a future blog post

Some more answers, I’m really happy about the positive feedback here :)

@Alan Stagner, yes running local server/client in the same process sounds like something we’re looking into already.

@Wolfos and @DigitalGlass, yes, you’ll likely be able to run the simulation server yourself, much like you can run a headless unity player now but more optimized for running as a dedicated server process. We’ll have more info on that later.

@U3DXT, the plan is to look into having interpolation, client side prediction, area of influence and that type of generic optimization support directly out of the box.

@U3DXT and @Simon Jackson, we’ll be providing relay servers and the matchmaker as a service. I’m actually not sure if we’ll have these available for download.

@Alexey: What he meant by LAN support: Hosting a local game by being a server and a client at the same time. This is one of my most urgent needs as well.

I’ll try to describe the issue with some examples, it’s hard to give a good description.

RPCMode.Server does not send the RPC to the server if you are the server yourself. RPCMode.Clients does not exit, but would be very helpful.

You should be able to choose between three network modi: Client, Server, Host. If you are the host, both RPCMode.Server and RPCMode.Client calls reach you.

A network call (RPC) should not be called by strings with a network view. It should be called like a normal method over a network communication layer:
Network.sendRPC(GameObjectRef.somefunction(args[]), RPCMode);

If an RPC call would be sent to the instance it comes from, skip the network and call it directly.

I implemented the above communication layer myself, could provide it if it helps.


Furthermore variable syncing over the network should not be called by OnNetworkSerialisation(), requiring a networkView that observes the script.

Maybe all synced variables could be registered in the “Network. Somehow like this:

Network.registerSnycVariable(ref variableToBeSynced, NetworkPlayer[] playersToBeSharedTo, float syncTimeSteps, System.Func functionThatAsksIfSyncingIsNecessary());

public bool function ThatAsksIfSyncingIsNecessary ()
// e.g. Test for RMSD of two Vectors and returns if it reaches the threshold

Fantastic news guys/gals, as with all the new big announcements a great investment in the future.

Will the new networking backend be available as a service
And will it also be available as a download to be able to host on our own servers such as azure, aws, etc?

Hey guys, thanks for all great feedback and questions. I’ll try to answer a couple of them right now. Alexey gave some answers earlier and the rest of the team will jump in later with even more answers.

Regarding pricing and the pro/free feature split, we do not yet have a plan set in stone. The way we usually think about this is something like most features should be free and features that are more for professional use should be pro. So maybe, for example, we would do the High Level API as part of free and the Low Level API as part of pro. Maybe. We don’t know yet. And we will have hosting available as briefly described above. How we handle that is also not yet settled. I promise we will let you guys know when we are more settled on that.

Regarding making the UDP protocol open source, I think it sounds like a good idea. We need to sort out how we would do that so I can’t yet say what the plan is. But we all like the idea and will see how we can make that happen.

Great, I was just working on wrapping the Current Unity networking to build a Fully Authoritative Solution that actually behaves like a socket UDP based design.
we managed to get it working with excellent performance (Way better than most solutions currently on the Store) and a pristine ease of use.
We managed to develop a Full Size MOBA. With some really interesting Free for all 64 player game modes XD
I guess I’m a little late for asking someone from Unity for a job to help make the networking better. I Love Unity!

PS: I just noticed that this announcement probably was a birthday present – thanks again ;-)

It’s really great to have these news official ;-) … can’t wait to have Unity with “proper networking” and the current plan sounds like a really really good one. Especially having the “low-level access” and a more abstract higher level access sounds very reasonable. It’s one of the things that was a real problem with the old Unity networking – and it totally wasn’t “Unity style” (usually, Unity doesn’t limit creativity – with the old networking, however, it did).

most awesome and welcome news!

will be interesting to know if such things as steamworks will be … .a pluggable service extension to the framework.

Hi, do you have an answer to my question? Will this be part of Unity 5.x or something that will have to purchased separately?

Will the high level API also have interpolation and client side predication APIs? Also, right now, the relay servers and master servers are available for us to run ourselves. In the next version, will this also be the case or will we have to rely on Unity Cloud in some way to use the multiplayer features? Thanks!

Thanks a lot guys

Some answers:

>UDP!!! UDP looses packets. I understand it’s need for fast paced game like racing or FPS. But on something like “Turn Based Game” i.e “Poker”, TCP is the best solution and UDP is no good.

UDP looses packets, but it is possible to create reliable protocol on top of UDP (as you can see that TCP created on top unreliable IP protocol). UNET (as many other game network libraries) supports reliable UDP, so, what is the problem here?

>Can you provide detail on what the HLAPI and LLAPI offer?
It is a plan :)

>There was no video game called “Need for Speed Online”, do we got some kind of leak here?
:) It is a bug: Need for Speed World :)

>Will this support LAN as well?
What do you mean?

>will the UDP based protocol be open source, like the rakenet which being used in 4.X
I personally do not see any reason why not. Hence, I just developer and cannot make 100% promises :)

>Will there also be diagnostic/profiling tools included with this new framework?
So far we are planning to add
-“bad network” simulator
-network message recorder
the first one will allow you to check game behavior with different delaying and jitter, second one will allow reproduce network input step by step.
As well, You are welcome with Your ideas:)

There was no video game called “Need for Speed Online”, do we got some kind of leak here?

This is awesome! I was a little on the fence about if I would be upgrading to Unity 5, but this pushed me over to it.

Can you provide detail on what the HLAPI and LLAPI offer? Their descriptions here are hollow and uninspiring; we’d love to know more and even dig into the guts of any beta documentation your team might be able to share.

It’s unclear from the article … will UNET be a component of Unity 5.x or will it be a separate product that will have to be purchased separately? As networking is currently a core component of the tool, I would expect the former but would like some clarrification.

What about things like headless game servers? Any plans on reducing the memory/cpu overhead of running unity game instances? I ask because that’s what is needed for a MOBA

One more thing, you guys have withdrawn support for TCP/UDP access for free version of unity mobile. I can use TCP/UDP on free version of web player or desktop but can not use it on mobile anymore. Just to have this support on android I would have to pay $1500(unity) + $1500(unity android) = $3000. Which seems like a lot for such a basic thing. If you guys really want to help indie developer and democratize multilayer game development then please allow support of TCP/UDP communication on mobile version of unity free, like it used to be before v3.5.

UDP!!! UDP looses packets. I understand it’s need for fast paced game like racing or FPS. But on something like “Turn Based Game” i.e “Poker”, TCP is the best solution and UDP is no good. Please have a way to switch to TPC or UDP based on developers need. Probably LLAPI is going to come in handy on this??

Sounds very interesting and I’m looking forward to get my hands on it to see how it compares to solutions I used and/or created in the past. Having solid solutions at hand is never wrong and I’m still somewhat puzzled that the best networking (performance and user experience wise) I used thus far is still the good, stone age old Tribes 2 / V12 / TGE networking …

What would be really cool is a toolkit of server side tools that I could deploy to a windows service or a web app ( That would blow the competition out of the water.

I wonder that UNET will support large scale MMO in later Phase? (i have mean something like WoW) I’m not interest with building multiplayer game (particulary like big MMO) now but later? who know…. And if these UNET will arrive when i need solution like that and fill my potential requirement (support large scale MMO) then it will be awesome!

Gets me quiet excited. Thought, you gotta have a hard time making this better than uLink from MuchDifferent. You should especially consider adding proper database support, like for SQL and no-SQL databases, since that simply comes with any proper multiplayergame.

I’m quite looking forward to this.
Is there going to be a way to run this in “offline” mode? Perhaps by having the simulation server run in another thread (like how Minecraft does singleplayer these days). Would be great if we could develop the game singleplayer that way, and then just pretty much enable multiplayer without much work.

Awesome.!!! Can’t wait to try. More interested in UDP concept & Authoritative structure.

Unity Team, You Rocks.

I bet, Unity would be best gaming engine in History (atleast for Indie & AA game developers).

[…] Unity Technologies announced UNET – Unity Multiplayer […]

Sounds nice. Will we be able to self-host as well? Unity Cloud sounds like it’d be a subscription service and I already have a VPS so paying for another host seems kinda redundant.

This is great, you rock ;)

Maybe you could add some kind of “Shared Assets” folder for projects so it would be easier
to seperate the client from the server (in different projects) but with some common assets.

Looking forward to it!

will you work with adobe to bring this to the flash player and also somehow to html5? (as of now, udp support is still unavailable in current flash player plugins)

Awesome :D I was just adding multiplayer to my TBS game. It’s the first time I’ve done this, and so far the current system was ok, though I already notices some shortcomings. I’m very interested to see what this UNET will bring :D

hopefully local machine hosted stuff too (like halo 4) so if a player hosting drops, it’s trivial to find another host and continue the game.

Will there also be diagnostic/profiling tools included with this new framework? One of the major pains in the a&& is understanding what went wrong in a networked game…

Excellent news. I hope you thread it throughout Unity. AAA games which aren’t multiplayer are rare. Most blockbuster titles have multiplayer in some form. Instead of bolt-on, make it an integral part of Unity.

Very happy with this.

Can’t wait! Server collisions has been a real pain and this is sorely needed; Ha i bet their going to somehow incorporate this with the cloud service and 1 day offer hosting like photon

Of course we’d love to hear pricing as well, but all in due time. Nice work!

Comments are closed.