2020-09-09 08:04:37 +00:00
![Mirror Logo ](https://i.imgur.com/fDxMOOT.png )
2018-09-25 11:37:56 +00:00
2020-01-18 22:00:50 +00:00
[![Download ](https://img.shields.io/badge/asset_store-brightgreen.svg )](https://assetstore.unity.com/packages/tools/network/mirror-129321)
2020-09-08 14:24:29 +00:00
[![Documentation ](https://img.shields.io/badge/docs-brightgreen.svg )](https://mirror-networking.com/docs)
2019-11-28 15:24:12 +00:00
[![Video Tutorial ](https://img.shields.io/badge/video_tutorial-brightgreen.svg )](https://www.youtube.com/playlist?list=PLkx8oFug638oBYF5EOwsSS-gOVBXj1dkP)
2018-11-13 19:55:15 +00:00
[![Forum ](https://img.shields.io/badge/forum-brightgreen.svg )](https://forum.unity.com/threads/mirror-networking-for-unity-aka-hlapi-community-edition.425437/)
2020-09-08 14:23:26 +00:00
[![Build ](https://img.shields.io/appveyor/ci/vis2k73562/hlapi-community-edition/Mirror.svg )](https://ci.appveyor.com/project/vis2k73562/hlapi-community-edition/branch/mirror)
2020-03-01 16:42:38 +00:00
[![Coverage ](https://sonarcloud.io/api/project_badges/measure?project=vis2k_Mirror&metric=coverage )](https://sonarcloud.io/dashboard?id=vis2k_Mirror)
2018-08-04 13:03:53 +00:00
[![Discord ](https://img.shields.io/discord/343440455738064897.svg )](https://discordapp.com/invite/N9QVxbM)
2018-11-13 19:35:20 +00:00
[![release ](https://img.shields.io/github/release/vis2k/Mirror.svg )](https://github.com/vis2k/Mirror/releases/latest)
2018-07-15 21:06:02 +00:00
2020-09-08 16:11:26 +00:00
**Stop worrying about networking. Because we do.**
2020-09-08 16:10:27 +00:00
2020-09-08 16:11:26 +00:00
## Mirror
2020-09-08 16:34:17 +00:00
Mirror is a **high level** Networking library for Unity, compatible with different **low level** [Transports ](https://github.com/vis2k/Mirror#low-level-transports ).
2018-07-15 21:06:02 +00:00
2020-09-08 16:32:43 +00:00
Mirror is for small indie games & large scale [MMOs ](https://www.youtube.com/watch?v=mDCNff1S9ZU ), made by the developers of [uMMORPG ](https://assetstore.unity.com/packages/templates/systems/ummorpg-components-edition-159401 ) and [Cubica ](https://www.youtube.com/watch?v=D_f_MntrLVE ).
2018-07-15 21:06:02 +00:00
2020-09-08 16:27:24 +00:00
Mirror is optimized for **ease of use** & **probability of success** .
2020-09-08 16:22:10 +00:00
2020-09-09 08:08:47 +00:00
We needed a networking library that allows us to ** [launch our games ](https://mirror-networking.com/showcase/ )** and **survive the next decade** .
2018-07-15 21:06:02 +00:00
2020-09-08 14:41:32 +00:00
## Architecture
2020-09-08 16:31:43 +00:00
The **Server & Client** are **ONE project** in order to achieve an order of magnitude gain in productivity.
2020-09-08 15:36:34 +00:00
2020-09-08 15:37:39 +00:00
Making multiplayer games this way is fun & easy. Instead of MonoBehaviour, Mirror provides **NetworkBehaviour** components with:
2020-09-08 15:41:47 +00:00
* **[Server]** / ** [Client]** tags for server-only / client-only code
2020-09-08 15:42:28 +00:00
* **[Command]** for Client->Server function calls (e.g. UseItem)
2020-09-08 15:41:47 +00:00
* **[ClientRpc]** / ** [TargetRpc]** for Server->Client function calls (e.g. AddChatMessage)
2020-09-08 15:42:01 +00:00
* **[SyncVar]** / SyncList to automatically synchronize variables from Server->Client
2018-07-15 21:06:02 +00:00
2018-08-28 10:43:21 +00:00
_Note: Mirror is based on Unity's abandoned UNET Networking system. We fixed it up and pushed it to MMO Scale._
2018-07-15 21:06:02 +00:00
2020-09-08 14:49:11 +00:00
## Low Level Transports
2020-09-08 14:36:41 +00:00
* (built in) [Telepathy ](https://github.com/vis2k/Telepathy ): TCP
* (built in) [UNET LLAPI ](https://docs.unity3d.com/Manual/UNetUsingTransport.html ): UDP
* (built in) [Ninja.Websockets ](https://github.com/ninjasource/Ninja.WebSockets ): Websockets
2020-09-09 08:05:37 +00:00
* (soon) Libuv: TCP powered by Node.js' native C networking
2020-09-09 09:13:31 +00:00
* [LiteNetLib ](https://github.com/MirrorNetworking/LiteNetLibTransport/ ) UDP
* [Ignorance ](https://github.com/SoftwareGuy/Ignorance/ ): ENET UDP
2020-09-08 14:36:41 +00:00
* [Apathy ](https://mirror-networking.com/apathy/ ): Native TCP
* [FizzySteam ](https://github.com/Raystorms/FizzySteamyMirror/ ): SteamNetwork
2018-11-09 14:50:35 +00:00
2020-09-08 14:49:11 +00:00
## Getting Started
2020-09-09 09:15:06 +00:00
Get **Unity 2018/2019 LTS** , download [Mirror on the Asset Store ](https://assetstore.unity.com/packages/tools/network/mirror-129321 ), open one of the examples & press Play!
2020-09-08 14:49:11 +00:00
Check out our [Documentation ](https://mirror-networking.com/docs/ ) to learn how it all works.
2020-09-08 15:26:47 +00:00
If you are migrating from UNET, then please check out our [Migration Guide ](https://mirror-networking.com/docs/General/Migration.html ).
2020-09-08 14:49:11 +00:00
2020-09-08 14:56:54 +00:00
## Funding
2020-09-09 09:17:39 +00:00
Mirror is free & open source software funded by Donations. If you love it, please consider supporting [Mirror on GitHub ](https://github.com/sponsors/vis2k ). As reward, you'll receive our [Network Profiler ](https://mirror-networking.com/docs/Guides/Profiler.html?q=Profiler ), priority support and more :)
2018-07-15 21:06:02 +00:00
2018-10-08 15:11:50 +00:00
## Benchmarks
2019-02-17 18:12:40 +00:00
* [uMMORPG 480 CCU worst case test ](https://youtu.be/mDCNff1S9ZU ) (everyone broadcasting to everyone else)
2018-07-15 21:06:02 +00:00
2020-09-08 15:18:05 +00:00
## Development & Contributing
2020-09-08 15:23:04 +00:00
Mirror is used **in production** by games ranging from small indie projects to large scale MMOs that will run for a decade or more.
2018-07-15 21:06:02 +00:00
2020-09-08 15:23:39 +00:00
10 years from now if your players encounter a networking bug and most of our contributors already moved on, someone will need to fix it. Therefore it is of utmost importance for us to follow the [KISS principle ](https://en.wikipedia.org/wiki/KISS_principle ) in order for our games to survive.
2018-06-07 13:40:15 +00:00
2020-09-08 15:22:33 +00:00
Keeping the next decade in mind, contributing **fixes** / **tests** / **improvements** is highly appreciated while new features have a low probability of being merged.
2019-03-16 10:03:03 +00:00
2020-09-08 15:22:33 +00:00
_At this point, what we don't add to Mirror is more important than what we do add to it!_