How to Build a Multiplayer Game with Unity + Mirror

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025

ความคิดเห็น • 244

  • @murkorus7147
    @murkorus7147 ปีที่แล้ว +16

    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 4 ปีที่แล้ว +108

    Finally someone making a good multiplayer tutorial for Unity! Thanks alot man!

  • @FlorisChan
    @FlorisChan 4 ปีที่แล้ว +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!!

  • @WilliamClavier
    @WilliamClavier 4 ปีที่แล้ว +12

    I wasn't expecting this series to be so new, I thought it was another tutorial from like a year or two ago

  • @pierrelamusse8350
    @pierrelamusse8350 4 ปีที่แล้ว +1

    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 !

  • @Tongyo42
    @Tongyo42 4 ปีที่แล้ว +11

    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!

  • @RogueWorlds
    @RogueWorlds 4 ปีที่แล้ว +81

    I'm glad you picked Mirror, there are already way too many photon tutorials

    • @ShrineApp
      @ShrineApp  4 ปีที่แล้ว +26

      Agreed! And Mirror is definitely the way to go imo

    • @rikrishshrestha5421
      @rikrishshrestha5421 4 ปีที่แล้ว +5

      Totally agreed, it's hard to find good mirror tutorial.

    • @tal5008
      @tal5008 4 ปีที่แล้ว +2

      @@rikrishshrestha5421 but not for me lol

    • @rikrishshrestha5421
      @rikrishshrestha5421 4 ปีที่แล้ว +4

      @@tal5008 you mean to say you've found some good mirror tutorial, any recommendations?

    • @ItsCodeRedYT
      @ItsCodeRedYT 3 ปีที่แล้ว +1

      @@rikrishshrestha5421 dapper dino is pretty good

  • @devyncurley6311
    @devyncurley6311 4 ปีที่แล้ว +14

    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  4 ปีที่แล้ว +1

      Glad it was helpful!

  • @caiowcosta
    @caiowcosta 4 ปีที่แล้ว +11

    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 4 ปีที่แล้ว +1

      tyty! was losing my mind over this one.

    • @sh0ckwav3_
      @sh0ckwav3_ 4 ปีที่แล้ว +1

      Thank you so much.

  • @jdonaldsontcs
    @jdonaldsontcs 4 ปีที่แล้ว +15

    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  4 ปีที่แล้ว +2

      Yep I have a rough roadmap in my head but I'll def keep that in mind. thanks for the kind words :)

  • @ShrineApp
    @ShrineApp  4 ปีที่แล้ว +39

    Hope you enjoyed the first tutorial! You can join our Discord here: discord.shrine.app

    • @caspronauta
      @caspronauta 4 ปีที่แล้ว

      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  4 ปีที่แล้ว

      @@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 4 ปีที่แล้ว

      Great JOB

    • @sergius.of.nothing
      @sergius.of.nothing 4 ปีที่แล้ว +1

      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

  • @gamesinajar7577
    @gamesinajar7577 4 ปีที่แล้ว +5

    Been waiting years for a good multiplayer tutorial in unity! This is perfect, thank you so much!

  • @sushiwaumai4773
    @sushiwaumai4773 4 ปีที่แล้ว +6

    This tutorial is way better than the networking tutorial from Tom Weiland. You can actually understand the stuff. Great job!

  • @Ayyouboss
    @Ayyouboss 4 ปีที่แล้ว +14

    Your channel is just way too underrated. Great work!

    • @tamla9875
      @tamla9875 3 ปีที่แล้ว

      Cuz his logo looks like shit

  • @motorparadise
    @motorparadise 3 ปีที่แล้ว

    I searched for Unity Multiplayer Mirror and Got Git in Bonus. Great Work. Great Explanation.

  • @chatbear69
    @chatbear69 4 ปีที่แล้ว +1

    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.

  • @Kusaji
    @Kusaji 2 ปีที่แล้ว

    Great first video, will be watching the rest of the series. Thank you.

  • @sebasVarela
    @sebasVarela 4 ปีที่แล้ว +2

    This is needed, a good multiplayer game tutorial in unity, your video is already in my favorites. thanks

  • @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.

  • @rustyrishii
    @rustyrishii 3 ปีที่แล้ว

    Holy shit man... it's really hard to believe that an amazing tool like ParrelSync is free. Absolute mad respect to whoever created that.

  • @adelinebrow3557
    @adelinebrow3557 4 ปีที่แล้ว +2

    Great tutorial! Please make sure to continue the series to the end 👍

  • @tuvbuv4491
    @tuvbuv4491 4 ปีที่แล้ว

    I have been trying for the past 10hr to figure out Mirror and This is the only good multiplayer tutorial i have found yet

  • @cloudlessrainvisions3264
    @cloudlessrainvisions3264 4 ปีที่แล้ว +1

    This is my favorite Mirror intro video! I think this should be added to the Mirror documentation!

  • @Limofeus
    @Limofeus 4 ปีที่แล้ว +9

    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!

  • @GregDunn
    @GregDunn 2 ปีที่แล้ว +4

    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

  • @spanishwithtyler
    @spanishwithtyler 3 ปีที่แล้ว

    So, so helpful! I am just beginning to learn how Mirror works, and this video was perfect!

  • @hasi-bhasan3448
    @hasi-bhasan3448 4 ปีที่แล้ว

    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!

  • @tsumurireallll
    @tsumurireallll 3 ปีที่แล้ว

    Great tutorial. I've never seen anybody credit Linus Torvalds when explaining Git before, and it was nice to see.

  • @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!

  • @madamutzsar
    @madamutzsar 4 ปีที่แล้ว +2

    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

  • @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!

  • @Devir666
    @Devir666 4 ปีที่แล้ว

    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 4 ปีที่แล้ว

    Many thanks! I'm amazed at how fast I got this multiplayer thing working thanks to you!

  • @meytristeed1525
    @meytristeed1525 4 ปีที่แล้ว +2

    Can't wait for the next part!

  • @rodgermccallister1606
    @rodgermccallister1606 2 ปีที่แล้ว +1

    Absolutely fantastic! Exactly the guide I needed to get started :)

  • @unity_with_timoteo
    @unity_with_timoteo 4 ปีที่แล้ว +2

    New sub here. i was looking for that! I cant watch now but i will soon!!!! Keep going man.

  • @randyh3761
    @randyh3761 3 ปีที่แล้ว

    Excellent! Was a huge help and great jump-start to a bare-bones multiplayer setup

  • @Cellfan
    @Cellfan 4 ปีที่แล้ว +4

    Thank you very much for the work you have put into all of this!
    Its amazing, good pace! Please keep it up :)

  • @SatyamKumarGuptaBME
    @SatyamKumarGuptaBME ปีที่แล้ว

    This was really helpful, thank you so much, for such a nice tutorial

  • @GingerNingerish
    @GingerNingerish 4 ปีที่แล้ว

    This tutorial is so well structured and clearly explained.

  • @tibiasurvival4307
    @tibiasurvival4307 4 ปีที่แล้ว

    Straight to the point, nice tuto!

  • @marshallwho
    @marshallwho 3 ปีที่แล้ว

    It was perfect tutorial for me
    all the error fixing and stuff
    perfect !
    really liked it

  • @李晨-w9q
    @李晨-w9q 4 ปีที่แล้ว

    Very good tutorial. I benefit a lot as a junior game developer. Thanks!

  • @Ivcifer
    @Ivcifer 4 ปีที่แล้ว

    you are a gentleman and a scholar.

  • @jaumeivars
    @jaumeivars 3 ปีที่แล้ว

    Mirror added your tutorials to its documentation tutorials!

  • @sininenhaitari6650
    @sininenhaitari6650 4 ปีที่แล้ว

    Really good looking stuff! Keep it up!

  • @dil.e_musafir
    @dil.e_musafir 3 ปีที่แล้ว

    Awesome Tutorial!!!!!🔥🔥🔥🔥

  • @sakul_the_one4821
    @sakul_the_one4821 3 ปีที่แล้ว

    Thx for this epic Totorial, it helped really!

  • @ArranAsh
    @ArranAsh 3 ปีที่แล้ว

    Thanks a lot, really helpful guide on getting started

  • @rus89
    @rus89 3 ปีที่แล้ว

    Amazing tutorial.
    Thanks for the time and effort you put into this.

  • @kamleshk267
    @kamleshk267 4 ปีที่แล้ว +3

    Oh god! This is the best finally...

  • @NelsonSKA
    @NelsonSKA 2 ปีที่แล้ว

    Great Tutorial!!!

  • @harsshtshah1051
    @harsshtshah1051 3 ปีที่แล้ว +2

    Hello, I am facing an issue, I am unable to use ' using mirror; ' command as shown in the video.
    18:50
    Any idea what should I do?

    • @96idgaf
      @96idgaf 3 ปีที่แล้ว

      using Mirror; Capital Letters Matter ;)

  • @jackbrown9791
    @jackbrown9791 4 ปีที่แล้ว

    Looking forward to the next one 😁😁😃

  • @xGAMER-xc4tm
    @xGAMER-xc4tm 4 ปีที่แล้ว

    im rly a beginner in this but with this tutorial i think i could make my dream game

  • @duwangchew
    @duwangchew 3 ปีที่แล้ว

    Great video, now I don't have to fail at university and finally get a degree.

  • @vimukthikulasekara2109
    @vimukthikulasekara2109 3 ปีที่แล้ว

    thanks man this video is awsome this helps me a lot...............

  • @RugbugRedfern
    @RugbugRedfern 4 ปีที่แล้ว +12

    Are you ever going to cover steam implementation? Lobbies/friends/dedicated server hosting?

    • @ShrineApp
      @ShrineApp  4 ปีที่แล้ว +17

      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 4 ปีที่แล้ว +2

      @@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 3 ปีที่แล้ว

      your game is good. I didn't expect to see you here.

    • @RugbugRedfern
      @RugbugRedfern 3 ปีที่แล้ว +1

      @@mikelanimations138 thanks dude :)

  • @brainshack9077
    @brainshack9077 3 ปีที่แล้ว

    Dots is like Fusion energy, always at least a year away :D

  • @dshreenath360
    @dshreenath360 4 ปีที่แล้ว +2

    is it possible to make a host migration for mirror and that to without any time delay ? Please answer me. thank you

  • @washburnlane
    @washburnlane 4 ปีที่แล้ว

    Outstanding, thank you!

  • @djjimmaster8261
    @djjimmaster8261 3 ปีที่แล้ว

    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

  • @amandalinn3618
    @amandalinn3618 ปีที่แล้ว

    Amazing tutorial and I love ParrelSync! I remember you having other videos but they disappeared. do you know where they went?

  • @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

  • @grzegorzwierzbicki8150
    @grzegorzwierzbicki8150 2 ปีที่แล้ว

    Hello, could you help me? I set up a new project (2D), imported mirror and parrelsync. When runnig a game I do not see the table with host/Client. Thanks

  • @ColorfullHD
    @ColorfullHD 4 ปีที่แล้ว

    Great tutorial, thanks!

  • @sumitcutevil9260
    @sumitcutevil9260 3 ปีที่แล้ว

    tysm m gettting started helps a lot

  • @dan-mechanics2014
    @dan-mechanics2014 3 ปีที่แล้ว

    Amazing tutorials

  • @LSM-Farms
    @LSM-Farms 4 ปีที่แล้ว

    Awesome, thanks for the tutorial

  • @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 👍

  • @Prolu7
    @Prolu7 3 ปีที่แล้ว +1

    For some reason for me this only works in Editor... When I build the project I cannnot connect from a second Instance of the "game"
    Edit: the two instances of the game are run on the same pc, but my Port should be open anyway.

  • @piztech5168
    @piztech5168 3 ปีที่แล้ว +1

    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

  • @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!

  • @AlexanderZotov
    @AlexanderZotov 4 ปีที่แล้ว

    This is just perfect!

  • @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.

  • @mukulkumar-xn2vx
    @mukulkumar-xn2vx 3 ปีที่แล้ว

    Disabling directory monitoring for current editor session. Found symlinks in project which cannot be used with directory monitoring. Directory monitoring settings can be changed in preferences.
    I am having this error can anyone help me..

  • @CryptoKaiwen
    @CryptoKaiwen 2 ปีที่แล้ว

    So about 3 minutes in when you're explaining the compatible version of Mirror 2018-19. Would Unity version 2019.4.12f1 LTS support Mirror Ok? Many thanks

  • @ShinichiKudoQatnip
    @ShinichiKudoQatnip 4 ปีที่แล้ว

    Subscribed and so thankful 🤗❤️
    I seriously want to get rid of my reliance on photon

  • @sandudianaelena1013
    @sandudianaelena1013 4 ปีที่แล้ว +1

    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?

  • @barboradarmova1368
    @barboradarmova1368 ปีที่แล้ว

    Can I ask what is Mirror LTS? Is there a downside to using free version as opposed to paying 80$? Will free Mirror be discontinued, will it stop working suddenly in existing projects, etc?

  • @programcoderpro8188
    @programcoderpro8188 3 ปีที่แล้ว

    hi i cant seem to find the parrel sync in unity. my version is 2020.3

  • @lucadallavilla9720
    @lucadallavilla9720 4 ปีที่แล้ว +3

    Hello. Thx for the vid. Just little problem: I was able to join with 2 devices when they both connected on the same LAN, but not when on different. May you help me? I'd be so grateful!

    • @ShrineApp
      @ShrineApp  4 ปีที่แล้ว

      See my dedicated server vid.

    • @lucastheys
      @lucastheys 2 ปีที่แล้ว

      I think you need to port forward your router
      you can do this online just search your internet provider + port forward

  • @MaGiStReall
    @MaGiStReall 4 ปีที่แล้ว

    Amazing! Keep it up

  • @ayan3789
    @ayan3789 4 ปีที่แล้ว +1

    it's a really good tutorial! show him some love by subscribing! great job!

  • @davidempson215
    @davidempson215 3 ปีที่แล้ว

    How could i encrease the capacity of people, i did some research, and there is a 600 person limit, how can i encrase it

  • @gamedoughhh
    @gamedoughhh 3 ปีที่แล้ว

    Wonder is it support the cross platform progress and IAP? Thx

  • @onefoxstudio
    @onefoxstudio 4 ปีที่แล้ว

    That is fuuuucking awesome ! ParrelSyncwoooooooooo

  • @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?

  • @FlipFlip
    @FlipFlip 3 ปีที่แล้ว

    Help pls, for some reason the client updates the position of the hosts player but the host doesnt update the position of the clients player

  • @saturnjr9136
    @saturnjr9136 3 ปีที่แล้ว

    So how would I parent a camera to the player so its first person? Does the camera also need a networkidentity?

  • @marcusferron
    @marcusferron 4 ปีที่แล้ว

    Very Good tutorial!!!

  • @viggovanvliet769
    @viggovanvliet769 3 ปีที่แล้ว +1

    Is it also possible to do this on two different devices instead of doing it locally on one device?

    • @timurakaev6741
      @timurakaev6741 ปีที่แล้ว

      Got the answer? if so how?

  • @lokeshgoyal1208
    @lokeshgoyal1208 2 ปีที่แล้ว

    Assets\Mirror\Runtime\NetworkReaderExtensions.cs(157,17): error CS0246: The type or namespace name 'ReadOnlySpan' could not be found (are you missing a using directive or an assembly reference?)
    i tried and stuck on these one, any idea to fix it

  • @aleksandarglisic1794
    @aleksandarglisic1794 4 ปีที่แล้ว

    Perfect Tutorial :)

  • @jinhyukkim683
    @jinhyukkim683 4 ปีที่แล้ว +1

    Hey Shrine Wars, thanks so much for the tutorial. I have a problem though. For me, all objects that have the Network Identity component are disabled as soon as I run the game. I've been searching for this for a while, but there isn't a solution posted anywhere on the internet. Any ideas?

  • @kevinp2540
    @kevinp2540 3 ปีที่แล้ว

    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)?

  • @kioka2
    @kioka2 3 ปีที่แล้ว

    Nice video man!! Good material to learn! One question... why a prefab must have only one NetworkIdentity?

  •  4 ปีที่แล้ว

    Loved this tutorial, but I was wondering how to use mirror to create a multiplayer project with Unity webgl... any advice?

  • @3mrxD
    @3mrxD 4 ปีที่แล้ว

    thanks for the content!

  • @ancolia8772
    @ancolia8772 3 ปีที่แล้ว

    3:35 so were things updated?