Search Unity

What has been open sourced exactly?

The multiplayer feature can be split into a lower and higher layer. The lower one is the transport layer, mostly residing in the NetworkTransport class. This layer exists inside the Unity engine and is written in C++. Its main purpose is to provide a thin layer above socket access and we optimized it for performance. Above this, we have the high level API, which is written in C# and exists in a modular extension DLL. This extension DLL has been open sourced and you can modify/extend it and replace the one shipped with Unity. It’s released under the MIT/X11 license, which means you can use it as you like and there are no restrictions or requirements for contributing back any changes.

Two levels of abstraction.

The manual has a good overview for what you can do with the high level API. There are many classes inside the extension DLL and you could consider this split into two layers as well. Using the NetworkClient and NetworkServer classes, you could set up connectivity manually or use the NetworkManager or NetworkLobbyManager for even higher level access. You can add these managers to a game object for immediate connectivity options with another built-in HUD component. You can also extend them to perform custom behaviours. It’s designed to be client/server based and server authoritative (with a few client authority exceptions you could use). These classes are a good reference for how you could use the transport level yourself, to implement your own custom high level API. Even if you don’t intend to change anything, I can recommend you take a look at these to learn more about how the high level works.

A few things to consider.

Three Visual Studio project files come with the source: one for runtime, another for editor and finally the editor-runtime. The last one is for the runtime version, which runs when in PlayMode in the editor. The update method here is pumped from the engine itself so you need to have the NetworkIdentity.UNetUpdate() function around or nothing will happen when running. We have a code generation step which runs every time the user assembly is compiled in the editor. This generator is called the UNetWeaver and we’re considering open sourcing that too. It parses the NetworkBehaviours and generates serialization code, Command/ClientRPC handlers, lookup tables and so on. The names of these things (SyncVar, Command, etc) need to stay the same for these things to continue functioning.

Get the open source repository on Bitbucket.

22 Comments

Subscribe to comments

Comments are closed.

  1. Good news. Thanks))

  2. this is incredible Thanks

  3. will you keep this up to date? Can I actually use this code instead of the one shipped with Unity?

    1. you may use these html tags and attributes.[

      1. Sorry, I am not sure what you mean

  4. great!
    can i using it on Unity v4.6?

  5. This is a great news guys, thanks for it!
    Any plans to open source the NetworkMatch class too?
    I totally understand that it contains some core code related to Unity Multiplayer Services, but the community may help here sending pull requests, or create custom Match Maker servers that better fit more complex specific needs.
    Anyhow, great work!

    1. Hi, I googled benengir camera classes Billings, MT and your previous class showed up. So I am emailing to inquire about if you might have another class coming up or if you are up for some private hire/tutoring!??!I’m desperate! I think I love photography, but as soon as I try and take a photo I get incredibly discouraged and walk away pouting. I don’t want to be the girl that forever uses her fancy DSLR camera in auto mode. I’d love any help!Thanks so much. Happy Holidays!-Sarah Barkie

  6. How about server side code?

  7. Thanks for sharing this awesome piece of news!

  8. Y u no Github ?

    1. Because Mercurial

  9. Now with the help of the community I expect the HLAPI to be as effective and stable as the LLAPI – and leave you guys more time to work on the much-expected server features. Well played, Unity!

  10. Great work guys!

  11. Error 500
    239806891ff2442ea9cb1eff1f08f844

    1. It seems to be working now.

      1. Wonderful exaopnatiln of facts available here.

    2. Most powerful&cost efcfvtiee SEO service in world get up to 100K backlinks now!Get incredible web traffic using amazing xrumer blast available. We can post your custom post up to 100K forums around the web, get insane amount of backlinks and incredible web traffic in shortest time. Most affordable and most powerful service for web traffic and backlinks in the world!!!!Your post will be published up to 100000 forums worldwide your website will get insatnt traffic and massive increase in seo rankings just after few days or weeks. Order now:

    3. Steve HutchensMay 18, 2012We’re seriously cosnrdeiing ordering a 2013 Unity U24IB after extensively shopped the Sprinter-based B+/C-Class alternatives. My wife and I both prefer the new graphics as they seem to flow better with the lines of the Sprinter and point forward. With regard to the current graphics, the two upper stripes seem to be out of place though otherwise they are nice. The current colours (blue, silver, and tan) are good. Among them, the subtle contrast between the white and silver seems most tasteful. Perhaps a lighter blue and a more golden tan would achieve the same subtle contrast when used with the white. I’ve seen some nice light tan/gold/cream colours on new luxury cars that would contrast tastefully with white. The purpose of graphics is to make what is essentially a big box look attractive and, especially in a B+/C-Class, they seem to work best when fully integrated with the lines of the cab and point forward.

    4. Thank you, I’ve recently been shiecrang for information about this subject for a long time and yours is the best I have came upon till now. But, what in regards to the bottom line? Are you positive concerning the source?|What i don’t realize is actually how you are now not really a lot more smartly-favored than you may be right now. You are so intelligent.

    5. errand carinsurance less than