![](https://i.imgur.com/d0amtqs.png)

MLAPI (Mid level API) is a framework that hopefully simplifies building networked games in Unity. It is built on the LLAPI and is similar to the HLAPI in many ways. It does not however integrate into the compiler and it's meant to offer much greater flexibility than the HLAPI while keeping some of it's simplicity. It offers greater performance over the HLAPI.
### Documentation
To get started, check the [Wiki](https://github.com/TwoTenPvP/MLAPI/wiki).
This is also where most documentation lies.

There is also a autogenerated Sandcastle [API reference](https://twotenpvp.github.io/MLAPI/docs/index.html).

### Requirements
* Unity 2017 or newer

## Feature highlights
* Host support (Client hosts the server)
* Object and player spawning \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Object-Spawning)\]
* Connection approval \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Connection-Approval)\]
* Message names
* Replace the integer QOS with names. When you setup the networking you specify names that are associated with a channel. This makes it easier to manage. You can thus specify that a message should be sent on the "damage" channel which handles all damage related logic and is running on the AllCostDelivery channel.
* ProtocolVersion to allow making different versions not talk to each other.
* NetworkedBehaviours does not have to be on the root, it's simply just a class that implements the send methods etc.
* Custom tickrate
* Synced network time
* Supports separate Unity projects crosstalking
* Passthrough messages \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Passthrough-messages)\]
* Scene Management \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Scene-Management)\]
* Built in Lag compensation \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Lag-Compensation)\]
* NetworkTransform replacement \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/NetworkedTransform)\]
* Targeted messages \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Targeted-Messages)\]
* Port of NetworkedAnimator \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/NetworkedAnimator)\]
* Networked NavMeshAgent \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/NetworkedNavMeshAgent)\]
* Networked Object Pooling \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Networked-Object-Pooling)\]
* Synced Vars \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/SyncedVars)\]
* Targeted Synced Vars \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/SyncedVars#target)\]
* Encryption \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/Message-Encryption)\]
* Super efficient BitWriter & BitReader \[[Wiki page](https://github.com/TwoTenPvP/MLAPI/wiki/BitWriter-&-BitReader)\]

## Example
[Example project](https://github.com/TwoTenPvP/MLAPI-Examples)

The example project has a much lower priority compared to the library itself. If something doesn't exist in the example nor the wiki. Please open an issue on GitHub.

## Special thanks
Special thanks to [Gabriel Tofvesson](https://github.com/GabrielTofvesson) 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](https://github.com/TwoTenPvP/MLAPI/issues)
