Unity Networking: Mirror, the Core Basics

Hello Mirror, I want to know more about you and therefore I am trying to write a blog post about it. They say it is a good thing to teach others to really hammer in the knowlage in your own brain. Why, I don’t really know. But I think that the overall continuous… And spellcheck is broken, great. I thought it was odd for it not to flood me with red lines.

What is Mirror?

Mirror is an add-on/plugin asset for Unity to simplify the the implimentation for Multiplayer. While it is one among many different multiplayer addons, what makes mirror different? It is free and people are usually quite happy with it. I know I am. I have encountered it a few times durring my lazy browsing days and during days when I looked to make some kind of multiplayer game. Mirror was just a good fit for me, it’s free, has good documentation and a bunch of youtube videos about it. But since I dont really like scrubbing through videos again and again for the few bits of knowlage that I forgot or did not know, I decided to make this instead.

Installing Mirror

Installing mirror is quite straight forward. Just go the the Unity assetstore and download it and add to your current project.
Asset store link: https://assetstore.unity.com/packages/tools/network/mirror-129321
Mirror documentation: https://mirror-networking.gitbook.io/docs/

Using Mirror

Using Mirror is quite straightforward. Create a new empty GameObject to attach the Mirror “NetworkManager” script to. The network manager script will automaticly add the rest of what it needs. Which is usually only the Network Transport script called “KCP Transport”. Atleast that was the default when this post was written. With those two things added, the core networking protocols are added and now it is only to create stuff that are using Mirror to make stuff happen over a network.

There are several different transports to choose from. If you know what specific type of transport you want you can just select that. If you want to know more the Mirror documentation will list most of the things you might wonder about.

Conclusions

Yeah… Not much was done. Next I will add an post about basic player movement. If there is any specific topic you want covered, harass me on twitter. I might, or might not, notice. Info is in the about page.

Leave a Reply

Your email address will not be published. Required fields are marked *