How to Build a Multiplayer Game with Unity + Mirror

  Рет қаралды 176,648

Shrine

Shrine

Күн бұрын

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

Пікірлер: 250
@murkorus7147
@murkorus7147 7 ай бұрын
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. :)
@AviatorXD
@AviatorXD 3 жыл бұрын
Finally someone making a good multiplayer tutorial for Unity! Thanks alot man!
@FlorisChan
@FlorisChan 3 жыл бұрын
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!!
@Tongyo42
@Tongyo42 3 жыл бұрын
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!
@gamesinajar7577
@gamesinajar7577 3 жыл бұрын
Been waiting years for a good multiplayer tutorial in unity! This is perfect, thank you so much!
@Limofeus
@Limofeus 3 жыл бұрын
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!
@devyncurley6311
@devyncurley6311 3 жыл бұрын
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.
@ShrineApp
@ShrineApp 3 жыл бұрын
Glad it was helpful!
@chatbear69
@chatbear69 3 жыл бұрын
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.
@derekrocco4344
@derekrocco4344 2 жыл бұрын
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!
@pierrelamusse8350
@pierrelamusse8350 3 жыл бұрын
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 !
@madamutzsar
@madamutzsar 3 жыл бұрын
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
@adelinebrow3557
@adelinebrow3557 3 жыл бұрын
Great tutorial! Please make sure to continue the series to the end 👍
@Cellfan
@Cellfan 3 жыл бұрын
Thank you very much for the work you have put into all of this! Its amazing, good pace! Please keep it up :)
@sebasVarela
@sebasVarela 3 жыл бұрын
This is needed, a good multiplayer game tutorial in unity, your video is already in my favorites. thanks
@WilliamClavier
@WilliamClavier 3 жыл бұрын
I wasn't expecting this series to be so new, I thought it was another tutorial from like a year or two ago
@randyh3761
@randyh3761 3 жыл бұрын
Excellent! Was a huge help and great jump-start to a bare-bones multiplayer setup
@frederickfreund1957
@frederickfreund1957 3 жыл бұрын
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!
@hasi-bhasan3448
@hasi-bhasan3448 3 жыл бұрын
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!
@GingerNingerish
@GingerNingerish 3 жыл бұрын
This tutorial is so well structured and clearly explained.
@Ayyouboss
@Ayyouboss 3 жыл бұрын
Your channel is just way too underrated. Great work!
@tamla9875
@tamla9875 2 жыл бұрын
Cuz his logo looks like shit
@spanishwithtyler
@spanishwithtyler 2 жыл бұрын
So, so helpful! I am just beginning to learn how Mirror works, and this video was perfect!
@Kusaji
@Kusaji 2 жыл бұрын
Great first video, will be watching the rest of the series. Thank you.
@Devir666
@Devir666 3 жыл бұрын
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!
@witch-doctor
@witch-doctor 3 жыл бұрын
Many thanks! I'm amazed at how fast I got this multiplayer thing working thanks to you!
@rodgermccallister1606
@rodgermccallister1606 2 жыл бұрын
Absolutely fantastic! Exactly the guide I needed to get started :)
@sushiwaumai4773
@sushiwaumai4773 3 жыл бұрын
This tutorial is way better than the networking tutorial from Tom Weiland. You can actually understand the stuff. Great job!
@RogueWorlds
@RogueWorlds 3 жыл бұрын
I'm glad you picked Mirror, there are already way too many photon tutorials
@ShrineApp
@ShrineApp 3 жыл бұрын
Agreed! And Mirror is definitely the way to go imo
@rikrishshrestha5421
@rikrishshrestha5421 3 жыл бұрын
Totally agreed, it's hard to find good mirror tutorial.
@tal5008
@tal5008 3 жыл бұрын
@@rikrishshrestha5421 but not for me lol
@rikrishshrestha5421
@rikrishshrestha5421 3 жыл бұрын
@@tal5008 you mean to say you've found some good mirror tutorial, any recommendations?
@ItsCodeRedYT
@ItsCodeRedYT 3 жыл бұрын
@@rikrishshrestha5421 dapper dino is pretty good
@jdonaldsontcs
@jdonaldsontcs 3 жыл бұрын
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!
@ShrineApp
@ShrineApp 3 жыл бұрын
Yep I have a rough roadmap in my head but I'll def keep that in mind. thanks for the kind words :)
@cloudlessrainvisions3264
@cloudlessrainvisions3264 3 жыл бұрын
This is my favorite Mirror intro video! I think this should be added to the Mirror documentation!
@rus89
@rus89 2 жыл бұрын
Amazing tutorial. Thanks for the time and effort you put into this.
@motorparadise
@motorparadise 2 жыл бұрын
I searched for Unity Multiplayer Mirror and Got Git in Bonus. Great Work. Great Explanation.
@meytristeed1525
@meytristeed1525 3 жыл бұрын
Can't wait for the next part!
@tuvbuv4491
@tuvbuv4491 3 жыл бұрын
I have been trying for the past 10hr to figure out Mirror and This is the only good multiplayer tutorial i have found yet
@unity_with_timoteo
@unity_with_timoteo 3 жыл бұрын
New sub here. i was looking for that! I cant watch now but i will soon!!!! Keep going man.
@zack4383
@zack4383 3 жыл бұрын
the other tutorial i watched sounded like a foreign language 15 minutes in, I understood this fully throughout the entire half hour. thank you.
@tibiasurvival4307
@tibiasurvival4307 3 жыл бұрын
Straight to the point, nice tuto!
@marshall2439
@marshall2439 3 жыл бұрын
It was perfect tutorial for me all the error fixing and stuff perfect ! really liked it
@tsumurireallll
@tsumurireallll 2 жыл бұрын
Great tutorial. I've never seen anybody credit Linus Torvalds when explaining Git before, and it was nice to see.
@user-kk1be7tu4g
@user-kk1be7tu4g 3 жыл бұрын
Very good tutorial. I benefit a lot as a junior game developer. Thanks!
@sininenhaitari6650
@sininenhaitari6650 3 жыл бұрын
Really good looking stuff! Keep it up!
@caiowcosta
@caiowcosta 3 жыл бұрын
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
@ImMrBigBigMac
@ImMrBigBigMac 3 жыл бұрын
tyty! was losing my mind over this one.
@sh0ckwav3_
@sh0ckwav3_ 3 жыл бұрын
Thank you so much.
@minkworks6143
@minkworks6143 Жыл бұрын
Very high quality tutorial. Thanks for this.
@SatyamKumarGuptaBME
@SatyamKumarGuptaBME Жыл бұрын
This was really helpful, thank you so much, for such a nice tutorial
@ArranAsh
@ArranAsh 3 жыл бұрын
Thanks a lot, really helpful guide on getting started
@rustyrishii
@rustyrishii 2 жыл бұрын
Holy shit man... it's really hard to believe that an amazing tool like ParrelSync is free. Absolute mad respect to whoever created that.
@sakul_the_one4821
@sakul_the_one4821 3 жыл бұрын
Thx for this epic Totorial, it helped really!
@jackbrown9791
@jackbrown9791 3 жыл бұрын
Looking forward to the next one 😁😁😃
@dil.e_musafir
@dil.e_musafir 2 жыл бұрын
Awesome Tutorial!!!!!🔥🔥🔥🔥
@kamleshk267
@kamleshk267 3 жыл бұрын
Oh god! This is the best finally...
@ShrineApp
@ShrineApp 3 жыл бұрын
Hope you enjoyed the first tutorial! You can join our Discord here: discord.shrine.app
@caspronauta
@caspronauta 3 жыл бұрын
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!
@ShrineApp
@ShrineApp 3 жыл бұрын
@@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
@sayvillegames
@sayvillegames 3 жыл бұрын
Great JOB
@sergius.of.nothing
@sergius.of.nothing 3 жыл бұрын
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
@NelsonSKA
@NelsonSKA 2 жыл бұрын
Great Tutorial!!!
@washburnlane
@washburnlane 3 жыл бұрын
Outstanding, thank you!
@GregDunn
@GregDunn 2 жыл бұрын
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
@ColorfullHD
@ColorfullHD 3 жыл бұрын
Great tutorial, thanks!
@Epic3dPro
@Epic3dPro 3 жыл бұрын
Awesome, thanks for the tutorial
@AlexanderZotov
@AlexanderZotov 3 жыл бұрын
This is just perfect!
@vimukthikulasekara2109
@vimukthikulasekara2109 2 жыл бұрын
thanks man this video is awsome this helps me a lot...............
@Ivcifer
@Ivcifer 3 жыл бұрын
you are a gentleman and a scholar.
@ShinichiKudoQatnip
@ShinichiKudoQatnip 3 жыл бұрын
Subscribed and so thankful 🤗❤️ I seriously want to get rid of my reliance on photon
@sumitcutevil9260
@sumitcutevil9260 3 жыл бұрын
tysm m gettting started helps a lot
@MaGiStReall
@MaGiStReall 3 жыл бұрын
Amazing! Keep it up
@dan-mechanics2014
@dan-mechanics2014 3 жыл бұрын
Amazing tutorials
@aleksandarglisic1794
@aleksandarglisic1794 3 жыл бұрын
Perfect Tutorial :)
@marcusferron
@marcusferron 3 жыл бұрын
Very Good tutorial!!!
@3mrxD
@3mrxD 3 жыл бұрын
thanks for the content!
@jaumeivars
@jaumeivars 2 жыл бұрын
Mirror added your tutorials to its documentation tutorials!
@xGAMER-xc4tm
@xGAMER-xc4tm 3 жыл бұрын
im rly a beginner in this but with this tutorial i think i could make my dream game
@kesselokingakoumou8063
@kesselokingakoumou8063 10 ай бұрын
Thank you so much.
@masoli2321
@masoli2321 3 жыл бұрын
thx for the vid helped a lot
@onefoxstudio
@onefoxstudio 3 жыл бұрын
That is fuuuucking awesome ! ParrelSyncwoooooooooo
@blushingbutterfly7742
@blushingbutterfly7742 3 жыл бұрын
thank you so much!
@techinspired5628
@techinspired5628 3 жыл бұрын
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 👍
@fahmibaguswibowo2058
@fahmibaguswibowo2058 3 жыл бұрын
thanks man !!!
@ayan3789
@ayan3789 3 жыл бұрын
it's a really good tutorial! show him some love by subscribing! great job!
@aleksey8405
@aleksey8405 3 жыл бұрын
Great!
@morybest
@morybest Жыл бұрын
very good
@brainshack9077
@brainshack9077 2 жыл бұрын
Dots is like Fusion energy, always at least a year away :D
@unkillablespirits8582
@unkillablespirits8582 2 жыл бұрын
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
@zukarimoto_q
@zukarimoto_q 2 жыл бұрын
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?
@leandrocruz6621
@leandrocruz6621 3 жыл бұрын
Muito obrigado, excelente
@magicpixeltree
@magicpixeltree 3 жыл бұрын
Awesome
@mooooooon9296
@mooooooon9296 3 жыл бұрын
Good job bro (Y)
@duwangchew
@duwangchew 3 жыл бұрын
Great video, now I don't have to fail at university and finally get a degree.
@dshreenath360
@dshreenath360 3 жыл бұрын
is it possible to make a host migration for mirror and that to without any time delay ? Please answer me. thank you
@sandudianaelena1013
@sandudianaelena1013 3 жыл бұрын
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?
@kioka2
@kioka2 3 жыл бұрын
Nice video man!! Good material to learn! One question... why a prefab must have only one NetworkIdentity?
@Jok55r
@Jok55r 2 жыл бұрын
thank u
@sqw33k
@sqw33k 2 жыл бұрын
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. :)
@dasjustinn
@dasjustinn 3 жыл бұрын
Cool
3 жыл бұрын
Loved this tutorial, but I was wondering how to use mirror to create a multiplayer project with Unity webgl... any advice?
@mickmickymick6927
@mickmickymick6927 3 жыл бұрын
May I suggest adding the playlist URL to the description, it's easier than having to go search for it each time.
@kiisshen244
@kiisshen244 3 жыл бұрын
Will this work if I play with my friends? They just connect to my ip addres? Will I need port fowarding etc?
@saturnjr9136
@saturnjr9136 3 жыл бұрын
So how would I parent a camera to the player so its first person? Does the camera also need a networkidentity?
@amandalinn3618
@amandalinn3618 Жыл бұрын
Amazing tutorial and I love ParrelSync! I remember you having other videos but they disappeared. do you know where they went?
@halo3forge
@halo3forge 3 жыл бұрын
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.
@ShrineApp
@ShrineApp 3 жыл бұрын
I would use PlayFab or GameLift
@djjimmaster8261
@djjimmaster8261 2 жыл бұрын
I can't get the cube to move on the client side? It looks like it's trying to move, but is being held back. The server side works fine
@ErenBR562
@ErenBR562 2 жыл бұрын
Hello, I'm creating an FPS camera and using the FirstPersonController script from Unity's StandardAssets, it works almost perfectly, however, do you know why when I activate the vertical mouse clamp, on mobile it keeps giving a nan nan nan problem on the camera? When I disable the clamp, the error disappears, however, the clamp is gone. Thank you!
@MahaneeshChandra
@MahaneeshChandra 3 жыл бұрын
Can we also do multiplayer elimination/round robin kinda knockout tournaments style with mirror & unity?
@RugbugRedfern
@RugbugRedfern 3 жыл бұрын
Are you ever going to cover steam implementation? Lobbies/friends/dedicated server hosting?
@ShrineApp
@ShrineApp 3 жыл бұрын
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
@RugbugRedfern
@RugbugRedfern 3 жыл бұрын
@@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.
@mikelanimations138
@mikelanimations138 2 жыл бұрын
your game is good. I didn't expect to see you here.
@RugbugRedfern
@RugbugRedfern 2 жыл бұрын
@@mikelanimations138 thanks dude :)
@nonstapp6558
@nonstapp6558 3 жыл бұрын
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
@ShrineApp
@ShrineApp 3 жыл бұрын
Can work across the entire Internet :)
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 5 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 24 МЛН
Multiplayer Game Architecture in Unity
15:21
Shrine
Рет қаралды 151 М.
Building the Core Mechanics for my Multiplayer Game
2:08
How To Build An Event System in Unity
8:01
Game Dev Guide
Рет қаралды 408 М.
How To Set Up A Dedicated Multiplayer Server - Unity PlayFab
13:26
How to make AWESOME Scene Transitions in Unity!
19:45
Brackeys
Рет қаралды 928 М.
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 5 МЛН