7e7683766f
* Initial Commit with Unity's Network Lobby Components * Lobby Components WIP * Massive simplifications and structural changes to NetworkLobbyManager and NetworkLobbyPlayer * Replaced more default messages with Command structure resulting in further simplification and less LOC * Completed removal of messages * Code Formatting and GUI Layout * Fixed bugs and finished Remove feature in UI * Added Network Lobby Manager Doc * Network Lobby Docs * Network Lobby Player Doc * Updated doc and image about Offline Scene * changed to PNG * Added Lobby components to navigation * Conformed to naming convention Removed some leftover cruft Removed maxPlayers (redundant to maxConnections) Trapped and killed null ref in OnServerDisconnect * Fixed mistake in OnServerDisconnect * Fix Active Scene check * Alow clean switch to Offline scene * Add Help URL attributes to components * Added Help URL Attributes * Fixed OnGUI logic error. * Added Example and README * Fixed Disconnect handler * Updated Docs * Added Header for Inspector * Finished Lobby Example Minigame * Minor cleanup * Set targetFramerates * Code Cleanup Changed to extended Lobby Manager for player Indexes & colors * Minor changes to align with Mirror's NetworkManager * Fixed logic error * SyncVar Hook Workaround Random Start Positions * Revert making CallOnClientEnterLobby public * Added documentation to the extension * Minor code rearrangement * Made OnGUI virtual so it can be overridden. Added AllPlayersReady bool for convenience to extenders Start Game enhancement to example. * added comments * Corrected namespaces and usings * Reworked DontDestroyOnLoad LobbyPlayer: Moved code from OnStartClient to Start Added LobbyPlayerExt to Lobby Example Code cleanup, added regions Fixed Start Game button bug * Final push of Lobby example to make sure it's complete. * Improved Lobby Example * Code cleanup * Added ground texture Set player camera angle Adjusted lighting angle * Updated ReadMe Cleaned up privates Fixed example to use SetParent Changed to 5 max connections in example * Prefab name fixes due to Mirror master's changes Changed camera handling and GamePlayer Prefab Two more SetParent fixes Demoted two warnings to information Added more comments to example scripts * Revisions based on Vis2K review...more to come. * Added f's where assigning literals to floats * Removed manual calls to SyncVar Hooks because the bug is now fixed. * Changed to GUILayout * wrapped in namespace * Changed to GUILayout * All changes per peer review * Renamed folder to Lobby. * Fix due to change in Mirror 1691 * Renamed Scenes Added LobbyScene property to OfflineGUI script. |
||
---|---|---|
.github/ISSUE_TEMPLATE | ||
Assets | ||
docs | ||
ProjectSettings | ||
Weaver | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
appveyor.yml | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md |
Mirror is a high level Networking API for Unity, built on top of the low level Telepathy library.
Mirror is built and tested for MMO Scale Networking by the developers of uMMORPG, uSurvival and Cubica.
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, period.
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.
[Server]
/[Client]
tags can be used for the server-only and client-only parts.[Command]
are used for Client->Server, and[ClientRpc]
/[TargetRpc]
for Server->Client communication.[SyncVar]
s andSyncList
s are used to automatically synchronize state.
What previously required 10.000 lines of code, now takes 1.000 lines of code. Therein lies the magic of Mirror.
Note: Mirror is based on Unity's abandoned UNET Networking system. We fixed it up and pushed it to MMO Scale.
Documentation
Check out our Documentation and read the Wiki.
The main difference is that you have to use using Mirror;
instead of using UnityEngine.Networking;
at the top of your scripts.
Oh, and you won't have to worry about channels, low level networking, packet loss, lack of support or bugs ever again. Mirror just works.
Usage Guide
If you are coming from a current UNET implementation or are seeking the stable version:
Import mirror from the Asset Store into your project.
Alternatively, you can install new releases manually:
Note: New releases are bleeding edge and may come with undiscovered bugs. Use at your own risk!
- Download Mirror (for Unity 2018.2.20 or 2018.3.x).
- Decompress the zip file in Assets
Migration Guide
If you are still using UNET and want to switch to Mirror, you should check out our Migration Guide. Don't panic, it's very easy and won't take more than 5 minutes.
Example Projects
Download Mirror from the Asset Store, we have several small example projects included.
For a fully polished complete project example, consider uMMORPG or uSurvival.
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)
Donations
Mirror is developed by volunteers. If you like what we are doing, consider leaving a small donation.
Benchmarks
- Telepathy 1000 connections test
- uMMORPG 480 CCU worst case test (everyone broadcasting to everyone else)
- uSurvival 122 CCU worst case test
Contributing
If you would like to contribute, feel free to submit pull requests and visit our Discord Server.
We follow the KISS principle, so make sure that your Pull Requests contain no magic.
We need Mirror to be MMO Scale. Bug fixes are always highly appreciated. New features will be considered very carefully.