Easy to use high performance Network library for Unity 3d
Mirage is a rolling-release high-level API for the Unity Game Engine that provides a powerful, yet easy to use networking API. Be it an online MMO, co-op adventure game or, a first-person shooter, Mirage improves your networked projects' probability of success significantly. With its modular structure and "use only what you need" approach, Mirage lets you unleash maximum performance out of your networking.
Networked objects in the client are mirror images of the objects in the server, and the API provides all the tools necessary to keep them in sync and pass messages between them.
Mirage is a rolling-release network stack. With every update, you get the latest features and bug fixes. You are encouraged to diagnose, report, and help fix bugs that you find: Issue tickets will be investigated, feature requests are considered, and pull requests are regularly reviewed.
Mirage is built by passionate network engineers and is backed by a friendly community.
To install Mirage, follow these steps:
Edit
menu, then select Project settings...
, select Package Manager
, and add a scoped registry like so: OpenUPM
https://package.openupm.com
com.cysharp.unitask
com.openupm
com.miragenet
com.miragenet.mirage
Window
menu and selecting Package Manager
. Then select Packages
, My Registries
, select the latest version of Mirage and click install, like so:
If you've got a project already using Mirror and you want to migrate it to Mirage, it's recommended to check out our Migration Guide for a smooth transition. Also check the heading below, as there are some major differences between Mirage and the other network library.
Mirage has some notable differences from its distant sister, Mirror. The table below briefly details them:
Mirage | Mirror |
---|---|
Installs via OpenUPM UPM repository | Installs from the Unity Asset Store |
Errors are thrown as exceptions | Errors are logged |
[ServerRpc] |
[Command] |
[ClientRpc(target = RpcTarget.Owner)] |
[TargetRpc] |
Subscribe to events in NetworkServer |
Override methods in NetworkManager |
Subscribe to events in NetworkClient |
Override methods in NetworkManager |
Subscribe to events in NetworkIdentity |
Override methods in NetworkBehaviour |
Methods use PascalCase (C# guidelines) | No consistency |
NetworkTime available in NetworkBehaviour |
NetworkTime is global static |
Send any data as messages | Messages must implement NetworkMessage |
Supports Unity 2020.3 LTS or later | Supports Unity 2020.3 LTS or later |
Offers simple Socket API to implement new protocols | Each protocol requires a new transport |
Some notable features that Mirage has:
Peeking under the hood, Mirage is built upon fundamental pillars:
If you want to contribute to Mirage, follow these steps:
cd /path/to/somewhere/on/your/disk
mkdir MirageNetworking
git clone https://github.com/MirageNet/Mirage.git MirageNetworking
cd C:\UnityProjects\DontReallyUseThisExamplePath
mkdir MirageNetworking
git clone -c core.symlinks=true https://github.com/MirageNet/Mirage.git
If you don't want to use administrator, add symlink support to your account.
If you don't enable symlinks, you will be able to work on Mirage but Unity will not see the examples.Mirage supports multiple ways of transporting data:
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
The team will review it ASAP and give it the stamp of approval, ask for changes or decline it with a detailed explanation.
Thank you for using Mirage and we hope to see your project be successful!