2019-03-08 12:15:38 +00:00
![Mirror Logo ](https://i.imgur.com/aZRKBeh.png )
2018-09-25 11:37:56 +00:00
2018-11-13 19:55:15 +00:00
[![Download ](https://img.shields.io/badge/asset_store-brightgreen.svg )](https://www.assetstore.unity3d.com/#!/content/129321)
2019-01-05 15:48:31 +00:00
[![Documentation ](https://img.shields.io/badge/documentation-brightgreen.svg )](https://vis2k.github.io/Mirror/)
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/)
2018-11-13 19:56:35 +00:00
[![donate ](https://img.shields.io/badge/donations-brightgreen.svg )](https://www.patreon.com/MirrorTelepathy)
2018-09-09 16:27:36 +00:00
[![Build status ](https://img.shields.io/appveyor/ci/vis2k73562/hlapi-community-edition/Mirror.svg )](https://ci.appveyor.com/project/vis2k73562/hlapi-community-edition/branch/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
2018-08-28 10:43:21 +00:00
Mirror is a **high level** Networking API for Unity, built on top of the **low level** [Telepathy ](https://github.com/vis2k/Telepathy ) library.
2018-07-15 21:06:02 +00:00
2019-03-16 09:38:20 +00:00
Mirror is built [and tested ](https://www.youtube.com/watch?v=mDCNff1S9ZU ) for **MMO Scale** Networking by the developers of [uMMORPG ](https://www.assetstore.unity3d.com/#!/content/51212 ), [uSurvival ](https://www.assetstore.unity3d.com/#!/content/95015 ) and [Cubica ](https://cubica.net ).
2018-07-15 21:06:02 +00:00
2018-08-28 10:43:21 +00:00
Mirror is optimized for **ease of use** and **probability of success** . Projects that use Mirror are small, concise and maintainable. uMMORPG was possible with < 6000 lines of code . We needed a networking library that allows us to [launch our games ](https://ummorpg.net/showcase/ ), period .
2018-07-15 21:06:02 +00:00
2018-08-28 10:43:21 +00:00
With Mirror, the **Server & Client are ONE** project _(hence the name)_ . Instead of having one code base for the server and one for the client, we simply use the same code for both of them.
2018-08-28 13:29:31 +00:00
* `[Server]` / `[Client]` tags can be used for the server-only and client-only parts.
2018-08-28 13:39:25 +00:00
* `[Command]` are used for Client->Server, and `[ClientRpc]` / `[TargetRpc]` for Server->Client communication.
2018-08-28 10:43:21 +00:00
* `[SyncVar]` s and `SyncList` s are used to automatically synchronize state.
2018-07-15 21:06:02 +00:00
2018-08-28 13:27:31 +00:00
What previously required **10.000** lines of code, now takes **1.000** lines of code. Therein lies the **magic of Mirror** .
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
2018-10-08 15:11:50 +00:00
## Documentation
2019-02-24 19:31:13 +00:00
Check out our [Documentation ](https://vis2k.github.io/Mirror/ ).
2019-03-16 09:38:43 +00:00
2019-03-16 09:37:29 +00:00
If you are migrating from UNET, then please check out our [Migration Guide ](https://vis2k.github.io/Mirror/General/Migration ). Don't panic, it's very easy and won't take more than 5 minutes.
2018-07-15 21:06:02 +00:00
2019-03-16 09:37:29 +00:00
## Installation
2019-02-12 09:06:44 +00:00
**If you are coming from a current UNET implementation or are seeking the stable version:**
2018-11-13 19:11:46 +00:00
Import mirror from the [Asset Store ](https://www.assetstore.unity3d.com/#!/content/129321 ) into your project.
2018-07-15 21:06:02 +00:00
2019-02-12 09:06:44 +00:00
**Alternatively, you can install new releases manually:**
*Note: New releases are bleeding edge and may come with undiscovered bugs. Use at your own risk!*
2018-07-15 21:06:02 +00:00
2019-02-12 09:06:44 +00:00
1. [Download Mirror ](https://github.com/vis2k/Mirror/releases ) (for Unity 2018.2.20 or 2018.3.x).
2019-03-16 09:37:29 +00:00
2. Decompress the zip file in your Assets folder
2018-07-15 21:06:02 +00:00
2018-10-08 15:11:50 +00:00
## Example Projects
2018-11-13 19:11:46 +00:00
Download Mirror from the [Asset Store ](https://www.assetstore.unity3d.com/#!/content/129321 ), we have several small example projects included.
2018-07-15 21:06:02 +00:00
2018-08-28 13:31:01 +00:00
For a fully polished complete project example, consider [uMMORPG ](https://www.assetstore.unity3d.com/#!/content/51212 ) or [uSurvival ](https://www.assetstore.unity3d.com/#!/content/95015 ).
2018-07-15 21:06:02 +00:00
2018-11-09 14:50:35 +00:00
## Community Transports
If you don't want to use Telepathy or UNET's LLAPI as low level transport, then check out:
* https://github.com/FizzCube/SteamNetNetworkTransport (SteamNetwork)
* https://github.com/SoftwareGuy/Ignorance/ (ENet)
2018-10-08 15:11:50 +00:00
## Donations
2018-09-24 20:10:19 +00:00
Mirror is developed by volunteers. If you like what we are doing, consider leaving [a small donation ](https://www.patreon.com/MirrorTelepathy ).
2018-07-15 21:06:02 +00:00
2018-10-08 15:11:50 +00:00
## Benchmarks
2018-08-28 10:43:21 +00:00
* Telepathy [1000 connections ](https://github.com/vis2k/Telepathy ) test
2019-02-17 18:12:40 +00:00
* [uMMORPG 480 CCU worst case test ](https://youtu.be/mDCNff1S9ZU ) (everyone broadcasting to everyone else)
2018-08-28 10:43:21 +00:00
* [uSurvival 122 CCU worst case test ](https://docs.google.com/document/d/e/2PACX-1vT28FcGXYlbG8gwi8DhD914n7K-wCAE8qhfetPkSli96ikc1Td3zJO1IiwVhfPVtKUHF0l3N7ZkM5GU/pub#h.pwbvffnwcewe )
2018-07-15 21:06:02 +00:00
2018-10-08 15:11:50 +00:00
## Contributing
2019-01-29 20:39:32 +00:00
If you would like to contribute, feel free to [submit pull requests ](https://vis2k.github.io/Mirror/General/Contributions ) and visit our [Discord Server ](https://discordapp.com/invite/N9QVxbM ).
2018-07-15 21:06:02 +00:00
2018-08-28 10:43:21 +00:00
We follow the [KISS ](https://en.wikipedia.org/wiki/KISS_principle ) principle, so make sure that your Pull Requests contain no magic.
2018-06-07 13:40:15 +00:00
2018-09-09 07:34:28 +00:00
We need Mirror to be MMO Scale. Bug fixes are always highly appreciated. New features will be considered very carefully.