How to Build a Multiplayer Game with Unity + Mirror
HTML-код
- Опубликовано: 19 июн 2024
- GitHub: github.com/ShrineGames/UnityM...
In this video, we'll set up everything we need to build a multiplayer game in Unity using Mirror.
Introduction: 00:00
Why Mirror: 01:20
Setting up Unity project: 03:00
Setting up ParrelSync: 04:54
Pong Example: 07:20
VSCode: 09:50
Git: 10:40
Multiplayer Demo: 14:26
Outro: 25:40
If you're using this tutorial around the time of this comment, you maybe got an error similar to me:
6 errors when trying to hit play at 21:14 in the video. Something about a transport not being assigned.
In the video, the Network Manager component automatically adds another component to the object and finds it, but it didn't do it in my version of unity and mirror (and maybe not in yours too). To fix this, go to your NetworkManager gameObject, in the inspector, click "Add Component", then search for "Telepathy Transport (Script)", and add it. In the Network Manager component on the same object you just added the Telepathy Transport component to, look for a setting called "Transport" (Probably around half-way down), drag and drop the Telepathy Transport (Script) component to that setting, and you should be good to go. :)
Amazing tutorial! Thanks for setting this up! Love seeing insights into others' dev envs alongside explanations of how these systems work - ParrelSync is a great inclusion here!
Been waiting years for a good multiplayer tutorial in unity! This is perfect, thank you so much!
Gorgeous tutorial! I was struggling to make at least something with multiplayer and also had to waste a lot of time compiling the project, this video helped me to fix all of my issues! Great guide!
I can't explain how happy I am that I found your tutorials. I am genuinely emotional because of the quality of this tutorial. Thanks so much!!
I was watching a couple tutorials on mirror and I figured i got the basics but i was struggling a lot on this first step. This Hello World approach helps wonders. Thanks dude!
Thank you for this series of videos on networking. I have learned more by watching 2 of your videos than I have learned in the past year. You are the man and please keep up the good work.
So well done! Thank you for putting in the effort for this, especially sharing how you use Parel Sync, and your set up on Visual Code.
Glad it was helpful!
Great intro !
It has been 2 days that I am trying to find up to date and interesting tutorials on mirror.
I think we have a winner !
Finally someone making a good multiplayer tutorial for Unity! Thanks alot man!
This is needed, a good multiplayer game tutorial in unity, your video is already in my favorites. thanks
I wasn't expecting this series to be so new, I thought it was another tutorial from like a year or two ago
duuuude. awesome. I think you refreshed the tutorials of mirror, you picked up a better way for conducting the network idea, and all the preparation with github, parrelsync and asset store is fast and well done. (the git part is very begginer-friendly)
I gonna see it all. thanks!
Thx a lot for that video! Very good quality and very helpful. I also like, that you introduce all the tools in this video. For my part I didnt hear of ParrelSync before and it seems to be super useful!
Your channel is just way too underrated. Great work!
Cuz his logo looks like shit
This tutorial is so well structured and clearly explained.
I'm glad you picked Mirror, there are already way too many photon tutorials
Agreed! And Mirror is definitely the way to go imo
Totally agreed, it's hard to find good mirror tutorial.
@@rikrishshrestha5421 but not for me lol
@@tal5008 you mean to say you've found some good mirror tutorial, any recommendations?
@@rikrishshrestha5421 dapper dino is pretty good
I hope this series gets continued, there are so many videos, that just keeps doing stuff, more like copy paste. But this video is amazing! Kudos!
Excellent! Was a huge help and great jump-start to a bare-bones multiplayer setup
great video, you're doing a fine job explaining things. I'm going to watch the rest of what you've uploaded and I look forward to more! :D
So, so helpful! I am just beginning to learn how Mirror works, and this video was perfect!
Many thanks! I'm amazed at how fast I got this multiplayer thing working thanks to you!
Great tutorial! Please make sure to continue the series to the end 👍
Thank you very much for the work you have put into all of this!
Its amazing, good pace! Please keep it up :)
This tutorial is way better than the networking tutorial from Tom Weiland. You can actually understand the stuff. Great job!
I searched for Unity Multiplayer Mirror and Got Git in Bonus. Great Work. Great Explanation.
This is my favorite Mirror intro video! I think this should be added to the Mirror documentation!
Great first video, will be watching the rest of the series. Thank you.
Absolutely fantastic! Exactly the guide I needed to get started :)
I wish you the best of luck with this series! Do yourself a favor and write out a roadmap so that you can keep yourself on track. The scope you laid out in this video is large but man is it needed! I look forward to watching it!
Yep I have a rough roadmap in my head but I'll def keep that in mind. thanks for the kind words :)
I have been trying for the past 10hr to figure out Mirror and This is the only good multiplayer tutorial i have found yet
the other tutorial i watched sounded like a foreign language 15 minutes in, I understood this fully throughout the entire half hour. thank you.
Can't wait for the next part!
Great tutorial. I've never seen anybody credit Linus Torvalds when explaining Git before, and it was nice to see.
Amazing tutorial.
Thanks for the time and effort you put into this.
Very high quality tutorial. Thanks for this.
Holy shit man... it's really hard to believe that an amazing tool like ParrelSync is free. Absolute mad respect to whoever created that.
If anyone is following along and getting an error about NetworkBehavior not being found... note that Mirror uses the British spelling and that's there's a u in there -- NetworkBehaviour
Straight to the point, nice tuto!
Very good tutorial. I benefit a lot as a junior game developer. Thanks!
Amazing tutorial, thank you! For those who are experiencing VSCode problems not finding the "Network Behavior" class and the "Mirror" namespace, go to the C# extension you installed and downgrade your version to 1.23.2, clicking on the gear and "installing another version..." and typing "1.23.2", for me it worked
tyty! was losing my mind over this one.
Thank you so much.
It was perfect tutorial for me
all the error fixing and stuff
perfect !
really liked it
Thanks a lot, really helpful guide on getting started
Oh god! This is the best finally...
This was really helpful, thank you so much, for such a nice tutorial
New sub here. i was looking for that! I cant watch now but i will soon!!!! Keep going man.
Thx for this epic Totorial, it helped really!
Outstanding, thank you!
Really good looking stuff! Keep it up!
Awesome, thanks for the tutorial
Looking forward to the next one 😁😁😃
Great tutorial, thanks!
This is just perfect!
you are a gentleman and a scholar.
Awesome Tutorial!!!!!🔥🔥🔥🔥
Great Tutorial!!!
tysm m gettting started helps a lot
Subscribed and so thankful 🤗❤️
I seriously want to get rid of my reliance on photon
Amazing tutorials
thanks man this video is awsome this helps me a lot...............
Amazing! Keep it up
Perfect Tutorial :)
thanks for the content!
Mirror added your tutorials to its documentation tutorials!
Very Good tutorial!!!
im rly a beginner in this but with this tutorial i think i could make my dream game
Thank you so much.
thx for the vid helped a lot
That is fuuuucking awesome ! ParrelSyncwoooooooooo
thank you so much!
Bro I am waiting for your new videos on this topic. Please upload it as soon as possible. It's my humble request 😁 Thank you 👍
it's a really good tutorial! show him some love by subscribing! great job!
thanks man !!!
very good
Im following this tutorial to the end , just wanna say , when i made the clone i had to open the scene in the original editor it wasnt just automatically open like yours but it connected
Great!
Thank you for this tutorial series! I am trying to implement your workflow into an existing single player project with a first person controller I got from the asset store (movement + cameraLook). Can I simply change the existing scripts from MonoBehaviour to NetworkBehaviour, and add the 'if (isLocalPlayer)' statement before everything that handles my existing functions?
Hope you enjoyed the first tutorial! You can join our Discord here: discord.shrine.app
Although I found the first video a little off-topic with all the networking background, I really enjoyed this one.
Would you explain in detail the lag that can be seen? It seems a little excessive to me, but it could be due to debuggers or other Whatnots. I would appreciate more on this on future videos.
Can not wait to see the next one!
@@caspronauta Glad to hear :) The actual network delay/lag in this is as minimal as it gets (since I'm running both clients on the same machine). There is some slight visual delay because I have 2 editor windows open + recording at 60fps
Great JOB
the ckecking of Client Authority checkbox on NetworkTransform was so fast, I completely missed it. So if anybody has issue with synching just check that that checkbox checked aha
Nice video man!! Good material to learn! One question... why a prefab must have only one NetworkIdentity?
Dots is like Fusion energy, always at least a year away :D
Awesome
May I suggest adding the playlist URL to the description, it's easier than having to go search for it each time.
Great video, now I don't have to fail at university and finally get a degree.
is it possible to make a host migration for mirror and that to without any time delay ? Please answer me. thank you
Good job bro (Y)
Muito obrigado, excelente
Nice video! Do you think now it's better to start a multiplayer project with Mirror or use MLAPI (which is now owned by Unity)?
Thanks for the tip about ParrelSync! I have a slight problem with it though and it is that the execution of either non selected copy of Unity seems to "fall behind".
As in, the (selected) one is sending data in FixedUpdate but the server isn't handling it at the same rate in it's FixedUpdate. If I switch it catches up and now consumes data faster than the other is sending.
I believe this to be related to windows not giving enough resources to handle both applications at equal priority but I am not sure and welcome any ideas on how to fix this. :)
Hi! I watched the multiplayer tutorial and I have a question. I have two players. One of them jumps. In the second player's window, the first player is shaking when he's trying to jump. But if both of them are walking,, everything looks smooth in both windows. Do you have any ideas?
Very nice tutorial, thanks! What is this mouse? It clicks like a mechanical keyboard switch :-)
Amazing tutorial and I love ParrelSync! I remember you having other videos but they disappeared. do you know where they went?
thank u
Cool
Great video, you explained everything very well. Quick question: If we are creating a game with 100 player functionality should we use PlayFab or self host with Easy-Wi or Pterodactyl? In terms or scalability I am thinking FlayFab makes more sense, that way we can focus on game development and not maintaining servers. What do you you think is the best route? We want an option that is scalable.
I would use PlayFab or GameLift
Loved this tutorial, but I was wondering how to use mirror to create a multiplayer project with Unity webgl... any advice?
Is it okay if I don't set up Git and backup my documents in Github? If so, is it really necessary and will be used later on other tutorials? I just really prefer not to do it, I'm just trying to learn and it's already too complex for me
Edit: Yeah nvm, I actually don't have to do it which is good for me. Also, great tuts man, clear explanation and very beginner friendly
So how would I parent a camera to the player so its first person? Does the camera also need a networkidentity?
Hello, great tutorial. I wonder if it works just on devices connected to the same network, or maybe it can work on different networks? Thanks for the reply
Can work across the entire Internet :)
Will this work if I play with my friends? They just connect to my ip addres? Will I need port fowarding etc?
Are you ever going to cover steam implementation? Lobbies/friends/dedicated server hosting?
Yep I will have vids about integrating with Steam for friends list, leaderboards, and matchmaking/lobbies. As for dedicated hosting, I'll cover a few different cloud providers
@@ShrineApp Very cool! Looking forward to this series. There aren't any covering steam and mirror in-depth at the moment, and it's been a little difficult to figure out.
your game is good. I didn't expect to see you here.
@@mikelanimations138 thanks dude :)