Skip to content
A game networking framework built for the Unity Engine to abstract game networking concepts.
Branch: master
Clone or download
TwoTenPvP Merge pull request #268 from jaglitegrann/bug/check-islistening-befor…

fix(spawning): Add check for NetworkingManager.IsListening before spa…
Latest commit d9af8fc Jul 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE Update issue templates Mar 19, 2019
Libraries Updated API reference and fixed search Mar 12, 2019
MLAPI-Editor fix: Fixed editor freezing when installing a transport while in compi… May 30, 2019
MLAPI-Examples fix: Fixed MLAPI Example callbacks Apr 17, 2019
MLAPI-Tests feat: Upgraded ENET and NUnit May 23, 2019
MLAPI Merge pull request #268 from jaglitegrann/bug/check-islistening-befor… Jul 17, 2019
docs Merge pull request #258 from MidLevel/diffie-hellman-article Jun 13, 2019
.editorconfig docs: add .editorconfig. (#246) May 28, 2019
.gitattributes Add .gitignore and .gitattributes. Jan 5, 2018
.gitignore Added logo & preliminary warning to API reference Mar 31, 2018
.releaserc refactor: Moved RufflesTransport to its own project May 23, 2019
BuildUnityPackages.ps1 fix(spawning): Soft sync instanceId generator was not included in builds Mar 25, 2019 Update Mar 20, 2019
GenerateApi.ps1 Appveyor updates. Mar 8, 2019
LICENCE docs(licence): Added 2019 copyright year to licence Mar 26, 2019
MLAPI.nuspec fix: Removed UnityEngine from NuGet package May 25, 2019
MLAPI.sln build: Removed transport projects May 25, 2019 feat: Added NuSpec file and NuGet badge May 25, 2019
_config.yml Excluded libraries folder from sites build Oct 24, 2018
appveyor.yml refactor: Moved RufflesTransport to its own project May 23, 2019
common.props Merge branch 'feature/csprojupdate' of Mar 8, 2019

GitHub Release NuGet Release Github All Releases

Discord Build Status AppVeyor Tests

Licence Website Wiki Api

MLAPI (Mid level API) is a framework that simplifies building networked games in Unity. It offers low level access to core networking while at the same time offering high level abstractions. The MLAPI aims to remove the repetetive tasks and reduces the network code dramatically, no matter how many of the modular features you use.

The MLAPI has features matched by nobody else, any more features are added when requested. The MLAPI is constantly evolving. Read about our features here.

Getting Started

To get started, check the Wiki. This is also where most documentation lies. Follow the quickstart, join our discord and get started today!


For bug reports or feature requests you want to propose, please use the Issue Tracker on GitHub. For general questions, networking advice or to discuss changes before proposing them, please use the Discord server.


The MLAPI is built to work everywhere. It will run in the web, on many Unity versions, .NET runtimes and such.

The requirements for the MLAPI are:

  • Unity >= 2017

Special thanks

Special thanks to Gabriel Tofvesson for writing the BitWriter, BitReader & ECDH implementation.

Issues and missing features

If there are any issues, bugs or features that are missing. Please open an issue on the GitHub issues page.


Here is a sample MonoBehaviour showing a chat script where everyone can write and read from. This shows the basis of the MLAPI and the abstractions it adds.

public class Chat : NetworkedBehaviour
    private NetworkedList<string> ChatMessages = new NetworkedList<string>(new MLAPI.NetworkedVar.NetworkedVarSettings()
        ReadPermission = MLAPI.NetworkedVar.NetworkedVarPermission.Everyone,
        WritePermission = MLAPI.NetworkedVar.NetworkedVarPermission.Everyone,
        SendTickrate = 5
    }, new List<string>());

    private string textField = "";

    private void OnGUI()
        if (IsClient)
            textField = GUILayout.TextField(textField, GUILayout.Width(200));
            if (GUILayout.Button("Send") && !string.IsNullOrWhiteSpace(textField))
                textField = "";

            for (int i = ChatMessages.Count - 1; i >= 0; i--)
You can’t perform that action at this time.