COMPLETE Unity Multiplayer Tutorial (Netcode for Game Objects)

  Рет қаралды 515,730

Code Monkey

Code Monkey

Күн бұрын

❤ Watch my FREE Complete Multiplayer Course • Learn Unity Multiplaye...
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👇 Click on Show More
🎮 Get my Steam Games unitycodemonkey.com/gamebundle
Quantum Console assetstore.unity.com/packages...
FREE Third Person Controller assetstore.unity.com/packages...
🔴 RELATED VIDEOS 🔴
How to use Unity Relay, Multiplayer through FIREWALL! (Unity Gaming Services) • How to use Unity Relay...
Join your Players in MULTIPLAYER with Lobby! (Unity Gaming Services) • Making a MULTIPLAYER G...
EASY Console! Run any Command! (Add Cheats, Set Gravity, Spawn Enemies Quantum Console Asset Review) • EASY Console! Run any ...
Why you should NOT make everything PUBLIC! • Why you should NOT mak...
What are Delegates? (C# Basics, Lambda, Action, Func) • What are Delegates? (C...
How to use NEW Input System Package! (Unity Tutorial - Keyboard, Mouse, Touch, Gamepad) • How to use NEW Input S...
What are Generics? (C# Basics) • What are Generics? (C#...
What are Value Types and Reference Types in C#? (Class vs Struct) • What are Value Types a...
What is the DIFFERENCE between Transform and GameObject? (Unity Tutorial for Beginners) • What is the DIFFERENCE...
Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) • Kickstart your game wi...
Free Unity Multiplayer? Backend? Monetization? What is Unity Gaming Services? • Free Unity Multiplayer...
Unity Authentication in 100 SECONDS! (Log in, Anonymous, Unity Gaming Services, Cloud Save, Relay) • Unity Authentication i...
💬 Let's learn how to get started with Netcode for Game Objects which is Unity's Official Multiplayer solution.
This is possibly the longest tutorial I've ever done and it's the only tutorial you need to get started making Multiplayer games!
00:00 Getting Started with Unity Multiplayer (Netcode for Game Objects)
02:19 Installing Netcode for Game Objects
03:18 NetworkManager
04:07 Unity Transport
04:41 Creating the Player
04:57 NetworkObject
05:19 Assigning the PlayerPrefab and NetworkPrefab List
06:19 First Quick Test
06:50 What is Server, Host, Client
08:11 Creating UI Buttons
09:23 NetworkManagerUI
11:08 Set Verbose Logging
11:27 Optional: Add Quantum Console to easily read the logs
12:22 Making a Build
13:01 Testing Host and Client
14:38 PlayerNetwork Script, Movement, NetworkBehaviour
17:42 NetworkTransform
18:56 Server-Client Authoritative, Ownership
20:20 ClientNetworkTransform
22:26 NetworkVariable
29:43 NetworkVariable with Custom Data Type, INetworkSerializable
35:06 ServerRpc
40:23 ClientRpc
43:09 Spawning and Despawning Network Objects
48:10 NetworkAnimator
51:58 Multiplayer Tools Package
55:13 How to Connect to a IP
56:45 Online Multiplayer Issues, Port Forwarding, NAT Punchthrough
59:58 Unity Gaming Services, Relay, Lobby, Mathmaker, Multiplay
01:00:52 More Resources
01:03:25 I hope you found the video helpful!
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampowered.com/app/12...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🎮 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
#unitytutorial #unity3d #multiplayer #gamedev
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Other great Unity channels:
Unity - / unity3d
BlackthornProd - / @blackthornprod
Jason Weimann - / @unity3dcollege
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Steam: store.steampowered.com/develo...

Пікірлер: 2 000
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
❤ Watch my FREE Complete Multiplayer Course kzfaq.info/get/bejne/bc2cdtZ3nszaY6c.html 💬 This was a ton of work so I really hope you like this video! Go ahead and build some multiplayer games! Thanks! 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 👇 Click on Show More 🔴 RELATED VIDEOS 🔴 How to use Unity Relay, Multiplayer through FIREWALL! (Unity Gaming Services) kzfaq.info/get/bejne/o9mAga1jyN67lqs.html Join your Players in MULTIPLAYER with Lobby! (Unity Gaming Services) kzfaq.info/get/bejne/Y7F0n6hzy6mmmYk.html EASY Console! Run any Command! (Add Cheats, Set Gravity, Spawn Enemies Quantum Console Asset Review) kzfaq.info/get/bejne/mLWWaaab1du3dqc.html Why you should NOT make everything PUBLIC! kzfaq.info/get/bejne/pqpiarymr62XfGw.html What are Delegates? (C# Basics, Lambda, Action, Func) kzfaq.info/get/bejne/acCWqtSI0ZO9eWQ.html How to use NEW Input System Package! (Unity Tutorial - Keyboard, Mouse, Touch, Gamepad) kzfaq.info/get/bejne/j9CVmMKWmcytc5c.html What are Generics? (C# Basics) kzfaq.info/get/bejne/bbycrM5-2Nm-qp8.html What are Value Types and Reference Types in C#? (Class vs Struct) kzfaq.info/get/bejne/ga12dNGo0LWUgJ8.html What is the DIFFERENCE between Transform and GameObject? (Unity Tutorial for Beginners) kzfaq.info/get/bejne/eJOUiclq3Lupkps.html Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) kzfaq.info/get/bejne/oL6qaMWQnuCUcpc.html Free Unity Multiplayer? Backend? Monetization? What is Unity Gaming Services? kzfaq.info/get/bejne/gN1zn6aUl8Xec2w.html Unity Authentication in 100 SECONDS! (Log in, Anonymous, Unity Gaming Services, Cloud Save, Relay) kzfaq.info/get/bejne/Z7GDfrWSxsnIe3k.html Quantum Console assetstore.unity.com/packages/tools/utilities/quantum-console-211046?aid=1101l96nj&pubref=ngo FREE Third Person Controller assetstore.unity.com/packages/essentials/starter-assets-third-person-character-controller-196526?aid=1101l96nj&pubref=ngo
@yonatanabergel
@yonatanabergel Жыл бұрын
Great Tutorial! Covering everything in one video is perfect! Advenced users can easily skip to any part they need and beginners can easily look over at this video while building any game and skip to any part they need help with quickly. One of the most perfect unity tutorials out there. I have been using netcode for the past year, something like this is definitely what we need. Thank you!♥️♥️♥️
@BloodBathFenix
@BloodBathFenix Жыл бұрын
"Liking" did not suffice my friend. I only wish I could have donated more in my other comment, but I'm sure opportunities for that will come later on.
@jorgeabuauad
@jorgeabuauad Жыл бұрын
dont get the sintaxis of the struct why the curly brackets is this like a new instance and a constructor with parameters. TestclientRpc
@morimora5730
@morimora5730 Жыл бұрын
Thank you 🙏
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
​@@jorgeabuauad Yes the curly brackets allows you to construct something and instantly set any of it's public fields, so it acts similar to a constructor in that you create and assign values at the same time
@bigedwerd
@bigedwerd Жыл бұрын
If you're having trouble with the new setup of NetworkManager's Network Prefabs Lists like I did, you need to add a NetworkPrefabsList to your project. You can do what I did and right click your Assets folder in the Project tab and click Create -> Netcode (was at the top for me) -> Network Prefabs List. Then you can add whatever Network Object to it and continue the tutorial like normal. Hope that helps.
@Subvius
@Subvius Жыл бұрын
tysm
@kameshpillay4325
@kameshpillay4325 Жыл бұрын
Not all heroes wear capes
@grooverkitty
@grooverkitty Жыл бұрын
plz pin!
@rafalfaro
@rafalfaro Жыл бұрын
The default scriptable object for some reason it's auto populating for me. I'm on Unity 2021.3.25f1
@thegameenjoyer6726
@thegameenjoyer6726 Жыл бұрын
You just Saved my ass thanks man!
@ThunderSn1per
@ThunderSn1per Жыл бұрын
How has this guy NOT been sponsored more? The content is absolutely brilliant, look at the time release from Netcode for Game Objects and this insanely comprehensive and easy to understand guide. I'm definitely going to be looking at getting CM's course, even if I don't fully complete them or ever look at them I know I'll be supporting one of the greatest resources to young aspiring game developers. So many thanks on behalf of so many people CM!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Many thanks for the kind words!
@erwin5126
@erwin5126 Жыл бұрын
That’s true I bought his courses and they’re amazing plus his coding practice is so clean, understandable and makes you want to code.
@atic01
@atic01 Жыл бұрын
True!
@igornascimento8098
@igornascimento8098 Жыл бұрын
Isn't it importing Multiplayer sample ultilities like you did?
@maxfun6797
@maxfun6797 Жыл бұрын
Well... they did give codemonkey an award. But it's true, this stuff is world class, and I can't belive its free.
@lime_68
@lime_68 Жыл бұрын
6:10 in newer version Unity doesn't accept individual prefabs but rather a scriptable object that contains prefabs. So right click-> create->net code->network prefab list
@mayzavan
@mayzavan Жыл бұрын
Thanks, knew i would find solution in comments
@dementi5100
@dementi5100 10 ай бұрын
@CodeMonkeyUnity please pin this comment
@koushaz
@koushaz 10 ай бұрын
Thanks
@aokisea
@aokisea 10 ай бұрын
Thanks bro
@maitrykotak3703
@maitrykotak3703 10 ай бұрын
life saver...thank u
@mrb1248
@mrb1248 Жыл бұрын
Thanks a lot I have been trying to use Photon to make multiplayer games but now that this is released i was hyped and already seeing a video from you explaining all of it is just surreal. Keep going and don't feel down about yourself your doing amazing things most people can't.
@joaopacheco2240
@joaopacheco2240 Жыл бұрын
Amazing! I wasnt expecting a 1h tutorial with this level of quality so fast.
@evlnu3495
@evlnu3495 Жыл бұрын
Amazing is the effort you put to explain the whole unity multiplayer as soon as it launched!
@WesleyOverdijk
@WesleyOverdijk Жыл бұрын
I figured out what makes your videos so good for me. It is the pacing. I tend to skip forward in videos because there's a lot of "filler". Here, every second something is happening is actually informative, and coding is sped up. Nice :D
@keparsons12
@keparsons12 Жыл бұрын
This by far is the best tutorial video EVER. The pace of the video is absolutely perfect! Thank you so much for this video it has helped me a ton with starting to grasp this concept / side of unity. I can't wait for the future episodes!!!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you liked it! Thanks!
@billis_miro
@billis_miro Жыл бұрын
Just what i needed. I have been watching your videos for the past two years and trying to make my hobby as an indie a real thing. Your videos have been a great help thank you very much!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks for the super thanks! Best of luck in your indie journey!
@maxg5196
@maxg5196 Жыл бұрын
Hyped for more videos on NGO! Specifically on the Relay topic, but also on topics regarding more advanced concepts like interpolation to hide latency, extrapolation or clientside prediction, etc.
@PandiWitch
@PandiWitch Жыл бұрын
honestly the best soft tutorial ive ever seen. short and straight to the point ! i love it
@Cr1mSon9
@Cr1mSon9 Жыл бұрын
You are the best, covering the theories from Networking and explaining how the code is working is what very less tutorials do. They don't usually explain "How it works?".
@Breckdareck
@Breckdareck Жыл бұрын
Thank you so much for this! There's a severe lack of multi-player tutorials, specially of those that are free, and most importantly up to date. I was trying to send $10 with my comment but I forgot my password. I will donate when I get back home from work. Thanks again for all you do and continue the great work! We all appreciate you.
@matto1919
@matto1919 Жыл бұрын
Thankyou! Not only do you tell us what to do, you explain it to us, which unlike most other tutorials, allows us to fully understand and do whatever we want with the knowledge instead of directly telling exactly what to do. Once again, thankyou, this is very useful for me as a beginner testing out unity multiplayer.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found the video helpful! Thanks!
@jean-michel.houbre
@jean-michel.houbre Жыл бұрын
From the bottom of my heart, thank you for this gigantic work: I don't even dare to imagine the time it took you for the search for information, the tests and the editing. I had some knowledge on Mirror, I didn't have too many difficulties to follow. Armed with this new knowledge, I will be able to progress in this area.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks for the kind words!
@cradle_of_chaos
@cradle_of_chaos Жыл бұрын
This is absolutely what people need to get started with Multiplayer games in Unity. Looking forward to the Unity Gaming Services video and maybe a walkthrough of the Boss Room sample game!
@ChrisVranos
@ChrisVranos 11 ай бұрын
Dude, I've been trying to get this working for days now, and just stumbled upon your tutorial. First place where I've seen these topics actually make sense, and the steps are clear enough to follow. I hope the viewers support can help keep you going!
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Thanks for the super thanks! I'm glad the video helped you! Best of luck with your game
@apocello42
@apocello42 Жыл бұрын
Thank you! The timing of this 1.0 release could not have been better and your prompt, and stunningly complete, tutorial is already saving me a ton of headaches.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks! I'm glad the video is already helping you!
@fongaming101
@fongaming101 Жыл бұрын
How do you donate?
@apocello42
@apocello42 Жыл бұрын
@@fongaming101 underneath the video in the row of icons with Thumbs Up, Thumbs Down, etc. There is one called Thanks with a dollar sign in a heart. Depending on how much you're going to donate you could alternatively buy one of his courses, if you don't have them already.
@roygatz
@roygatz Жыл бұрын
I'm watching over and over, again and again; I believe this video not only helps me but many others like me. I would upvote this video as many times as I watch it.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad the video has helped you! Thanks!
@fv4202x
@fv4202x 8 ай бұрын
Coming back to this video months later when starting another multiplayer project. it made me feel good you still active and helping people. Most helpful content creator I ever seen
@CodeMonkeyUnity
@CodeMonkeyUnity 8 ай бұрын
Thanks! Best of luck with your new project!
@sonicbelmont300
@sonicbelmont300 Жыл бұрын
This is an incredible resource, and will definitely be helpful to many game devs. I would love to see you discuss: multiplayer teams that handle things like friendly fire and team spawn points, multiplayer character select screens, as well maps or something like lobby voting. There's so much untapped potential when it comes to Unity multiplayer tutorials.
@Archimagus
@Archimagus Жыл бұрын
Just getting back into network programming. Great tutorial. Also, they are moving pretty fast. The Network Variable synchronization now also supports strings.
@barkmober
@barkmober Жыл бұрын
You are literally the best. I wanted to make a multiplayer game really bad and considered photon but its kinda outdated. This couldnt have gone any better. Thank you for your contribution
@lemetamax
@lemetamax Жыл бұрын
This is so cool! I finally bought a synty asset for my next game coming, and it is going to feature local multiplayer. This video will be very helpful. I'll watch it very early tomorrow morning before getting ready for the day. Thank you Mr Code Monkey! You rock!!
@marveII0us
@marveII0us Жыл бұрын
The effort and time you put in these videos is insane! This probably took atleast 50 hours of work (including everything)
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Yup it's been non-stop for over a week but I'm really happy with the final result!
@marveII0us
@marveII0us Жыл бұрын
@@CodeMonkeyUnity whoa! Near to a 100+ hours then I suppose. In the previous comment I didn't think about voice-overs but they do indeed take a bunch of time
@pedroenmanuelfuenteszambra8873
@pedroenmanuelfuenteszambra8873 Жыл бұрын
OMG this is so good! you make probably the most detailed videos in the Unity KZfaq. I would love a tutorial like this for a simple turn based game (cards, classic JRPG or something like that) with a dedicated server.
@dwried
@dwried Жыл бұрын
From experience most tutorials make things look way easier than when you get into trying it yourself. You did a A1 job of making this look as easy as possible. :D
@kpm25
@kpm25 5 ай бұрын
Thanks a lot!! A one hour tutorial turned into about 8~10 hours work because I kept going off on tangents learning and experimenting but the best way to learn, cheers!
@LibertyLegion
@LibertyLegion 8 ай бұрын
Thank you for the tutorial!😊 To those who unable to get the client to move when switching to the third/3rd person character controller. I think, the problem is duplicating Player Input component by spawning 2 prefabs with it. There are two variants that fixed this for me: 1. Switch Actions under the Player Input component attached to PlayerArmature to DefaultInputs. To do this, remove Actions object what is currently there. It will propose you to create new one to replace empty space, click this btn and create new Actions with default settings by this flow. 2. Move Player Input component and StarterAssetsinputs from PlayerArmature object to separate one. In this case you will have in scene only 1 Player Input component and they will not conflict with each other. Also do not forget to make code changes from CM.
@blackhawk-jw6ls
@blackhawk-jw6ls 6 ай бұрын
I also struggled making the second client move. My solution was to disable the PlayerInput component in the prefab by default and simply enable it back again (in the PlayerControllerScript) only if the current player is the owner of the object. _playerInput = GetComponent(); if (IsOwner) _playerInput.enabled = true; I hope this may also help somebody.
@kpm25
@kpm25 5 ай бұрын
@@blackhawk-jw6ls ...Thanks so much it worked!! ..now I can go on to the next job, cheers
@Striker112890
@Striker112890 5 ай бұрын
@@blackhawk-jw6ls THANK YOU! You saved me so much pain and misery.
@0Future
@0Future Жыл бұрын
this tutorial is extremely helpful, I just came back to unity from about a year and still not knowing too much, but I want you to know how much I appreciate you making this, I will most likely donate once I can, stay well :D
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found it helpful! Thanks!
@mathieujohnson7090
@mathieujohnson7090 Жыл бұрын
I just can't wait for the relay and lobby video(s) ! Good job as always CodeMonkey!
@Pesi0
@Pesi0 Жыл бұрын
Boi, first of all thanks for the turnbase game course, bought it and it was top quality. Second of all, as someone from IT, I respect you for takeing the time to get familiar with networking just to help your viewers. Much respect and keep up the good and quality work 🥳🥳
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks! I'm glad you enjoyed the course!
@94Kansas
@94Kansas Жыл бұрын
This video is insane! Amazing work! So much detailed! I learned a lot! I would be amazing if you would expand this tutorial to make a mini game! I have yo say that I expected this tutorial to be a payed tutorial, so I appreciate that you made this video for free! But I would also bought it or the expansion of this tutorial. Thank you so much for all your effort!
@mechasmoke
@mechasmoke Жыл бұрын
Thank you so much for creating these tutorials and providing them to us for free! This is an amazingly well done tutorial with tons of information, provided in a very clear and straightforward way. I am currently working on a VR game and I want to add multiplayer to it. This video is a great boost to get me where I need to be. You are amazing!!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found the video helpful! Thanks!
@NewbNinjas
@NewbNinjas Жыл бұрын
Unbelievable. You have out-done yourself CM. Amazing work! Thanks a million as always.
@akulgoel9259
@akulgoel9259 Жыл бұрын
Honestly, I don't regret subscribing - this is EXACTLY what I was looking for.
@Khaled_khalil
@Khaled_khalil Жыл бұрын
Same :D
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found the video helpful!
@chris.davidoff
@chris.davidoff Жыл бұрын
I highly recommend adding ParrelSync. Developing multiplayer without it is remarkably harder (no more making builds for every test!)
@cameronbonde7348
@cameronbonde7348 Жыл бұрын
Yep, seconded. It's crazy how Unity doesn't allow launching multiple instances of the game in-editor
@marcosmwb8444
@marcosmwb8444 Жыл бұрын
I'm developing for VR, even with parrelsync its hard.
@EscHatchStudio
@EscHatchStudio Ай бұрын
You are a gift to Unity creators everywhere! This video really helped me get over the hump with networking. I loved the bite size topics - I referred to it several times while coding my game. The biggest issue with networking for me was knowing where the data was, and getting and setting it properly - this video was instrumental in helping me make it happen. Thank you!
@CodeMonkeyUnity
@CodeMonkeyUnity Ай бұрын
Nice! I'm glad the video helped! Thanks!
@anujpartihar
@anujpartihar Жыл бұрын
Hats off to you sir! You are doing god's work by helping us all. I hope you do more of these detailed tutorials because they are an absolute godsend and you are very in-depth 🙌 Your work is highly appreciated by so many of us :))
@Breckdareck
@Breckdareck Жыл бұрын
Again, thank you so very much for this amazing content!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks for the Super Thanks!
@corn3724
@corn3724 Жыл бұрын
Appreciate how fast you got this video out!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I've been working non-stop this past week but I'm really happy with the final result!
@gabrielandraderosa8622
@gabrielandraderosa8622 Жыл бұрын
Simply the best tutorial I ever see, even a begginer like me can understand very much of it.
@VirtuallyCrafted
@VirtuallyCrafted Жыл бұрын
People like you are simply the best. Thank you for sharing your knowledge and helping us all learn!
@bogoid
@bogoid Жыл бұрын
Any plans on making a full course on multiplayer? I'm currently enrolled in your turn based course and i'm really enjoying it, you're helping me build the game of my dreams! thanks a lot man!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I would love to but courses take a ton of time to make so not sure if I can, I'm researching if I can make something on a smaller scale that wouldn't take several months to build
@godlia_
@godlia_ Жыл бұрын
Love the content Codemonkey! As of 8.12.22, NC4GO supports strings and gameobjects and such in NetworkVariables. Love the content!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Oh that's great, thanks for the update!
@jiper94
@jiper94 Жыл бұрын
Finding a video made by you on a new topic I'm trying to learn is the best, always top quality, thank you so much!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found my videos helpful! Thanks!
@Hyphen3372
@Hyphen3372 Жыл бұрын
seems like code monkey should be sponsored more! Like DUDE! THIS IS AWESOMEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!!! its really detailed and i can understand it even if i have no networking experience and easy to learn with Code Monkey's Teaching style which is just talking and talking about the important stuff and nothing else! Its also SUPER beginner friendly!
@satirical_snake
@satirical_snake Жыл бұрын
Can you PLEASE make a tutorial on picking up, holding, using, and dropping items in multiplayer? Parenting is seemingly impossible with Netcode and I feel like you could figure it out! A p2p tutorial would also be awesome! Thanks!
@qwertz3813
@qwertz3813 Жыл бұрын
I mean Brackeys was perfect and all but content of Code Monkey is somewhere else. Responding to comments, creating tutorial shortly after release.. Currently the best game dev channel. Should acquire more attention.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks for the kind words!
@あれくす
@あれくす Жыл бұрын
Code monkey you rock! And just FYI I have purchased from your courses before, in particulate the turn based strategy game . Thanks for being such a huge asset to the community.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks! I hope you enjoyed the course!
@josephstarke5363
@josephstarke5363 Жыл бұрын
Wow... sooo good; easy to understand, and your explanation and pacing are so good. I thought this would take me forever to achieve, thank you so much!
@alonsobaggins7550
@alonsobaggins7550 Жыл бұрын
To those unable to get the client to move when switching to the third person character controller, switch Actions under the Player Input component attached to PlayerArmature to DefaultInputs. Alternatively you can make your own InputActions file, which I had to do because for some reason DefaultInputs inverted the Y axis of my mouse input.
@qwertz3813
@qwertz3813 Жыл бұрын
thank you my man
@rafalfaro
@rafalfaro Жыл бұрын
This comment should be pinned. Thank you! I was about to revert back to the capsule.
@MangoPulver
@MangoPulver Жыл бұрын
Thank you for this answer! I can't find "DefaultInputs" when I try to change "Actions". Where do I find the default inputs?
@SchGames
@SchGames 11 ай бұрын
Thanks for the tip!
@aperson2703
@aperson2703 7 ай бұрын
For the Network Animator section 48:53, I had the same issue as other where the client wouldn't move, but the other solutions didn't work for me. To fix this I followed a stack solution. You just need to uncheck the Player Input component in the PlayerArmature, then paste the following code into the controller: public override void OnNetworkSpawn() { base.OnNetworkSpawn(); if (IsOwner) { _playerInput = GetComponent(); _playerInput.enabled = true; } }
@mezanstudios
@mezanstudios 6 ай бұрын
Thank you @aperson2703!
@sunnypanchal332
@sunnypanchal332 4 ай бұрын
Hello, I have tried implementing this solution. Now player control works in client side. However the animation is not synchronised. Can you help me if something you have done?
@gameri8805
@gameri8805 5 күн бұрын
Pin this
@vo_sk
@vo_sk Жыл бұрын
Thank you so much, your videos always inspire to learn more in Unity and make new games, going to dig it with your help right now! :)
@takkiemon
@takkiemon 11 ай бұрын
Thank you, Code Monkey! Haven't tinkered in Unity for about a year and it's nice to have some steady guidance on my return.
@korypostma
@korypostma Жыл бұрын
At 26:30, you would want to limit reading in cases where one person has info that no one else should know from the server. Think of like Among Us, some player is the saboteur and the rest are running around as innocents doing tasks. No one else needs to know who the saboteur is on the client side. In our game we had to lock down a lot of stuff like that because of cheaters and hackers using that sort of info to their advantage.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Oh you're right. I was thinking "if only the owner can read why make it a NetworkVariable at all?" and yeah the answer is for any knowledge that you want both the Server and just that one specific Client to know about. For just the Server or just the Client you would only need a non-networked variable, but for some knowledge that only those 2 know then yup I guess that's the use case. Thanks!
@eugeniopb4
@eugeniopb4 3 ай бұрын
if your client doesn't move is because in the input system is setting for Xbox Controller, in the StarterAssetsInputs script, implement a start method with these lines: PlayerInput PlayerInput = GetComponent(); PlayerInput.SwitchCurrentControlScheme("KeyboardMouse", Keyboard.current, Mouse.current);
@obd792
@obd792 2 ай бұрын
man you are the best
@비씨디
@비씨디 Ай бұрын
sibal you saved my life. Thank you so much. From South Korea.
@toprogress
@toprogress 6 ай бұрын
Amazing video! Thanks a lot for your work 🙏🏼! Now I understand way better how to use NetCode for Game Objects and my goal to create a turn-based multiplayer game seems even more realizable to me.
@spectralspace8866
@spectralspace8866 Жыл бұрын
I am currently using Fishnet but I am still confused and experiencing problems. This video solves it all also I just knew that Netcode was released because of you!!! Kudos to this Man!!!
@somehappyguy6598
@somehappyguy6598 Жыл бұрын
Thanks!
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Many thanks for the super thanks! I'm glad you found the video helpful! Check out the free course if you want to see this implemented in a full project kzfaq.info/get/bejne/bc2cdtZ3nszaY6c.html
@rambertoeco8930
@rambertoeco8930 Жыл бұрын
Have anyone else had the issue where the ThirdPersonController does not work on the client? Up until 49:39 everything works, but then I cannot move with the client. I've added the " if(!isOwner) return; " in ThirdPersonController script , I've got ClientNetworkTransform syncing positions, and I've added the player prefab to the NetworkManager. pls help :3 Edit: The problem seems to be the PlayerInput which auto-selects a Control Scheme other than KeyboardMouse. Connecting a gamepad solved that temporarily.
@daledroesse8279
@daledroesse8279 Жыл бұрын
Player Input->Actions=DefaultInputActions
@robertbalassan
@robertbalassan Жыл бұрын
you sir are a hero. i appreciate your effort to be so quick about it. i believe you are the firist to bring a quality tutorial on youtube about it. :D
@yuyewang8349
@yuyewang8349 9 ай бұрын
I just started to learn Unity. I feel so lucky that I found your channel and learning a lot from it!
@CodeMonkeyUnity
@CodeMonkeyUnity 9 ай бұрын
I'm glad my videos have helped, best of luck in your learning journey!
@Sk8_
@Sk8_ Жыл бұрын
Hey, I'm having a problem when using multiple camera's. How would I go about fixing this? I cannot seem to get clients to ignore other camera's that are within the scene. Any help is appreciated
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
What problem? Are you using Cinemachine? If so you need to make sure the local player, with IsOwner true is the only one with a Virtual Camera. Either destroy the virtual camera on the other players or lower their priority.
@Sk8_
@Sk8_ Жыл бұрын
@@CodeMonkeyUnity I am not using Cinemachine, however, I've tried lowering the priority and couldn't get that to work so I'll try destroying other players cameras.Thank you for your help.
@solarquakestudios2216
@solarquakestudios2216 Жыл бұрын
@@Sk8_ did you ever find a fix to this? Cant find any solutions to having the FPScams be separated under Playerprefab
@ruslanagadzhanyan2753
@ruslanagadzhanyan2753 Жыл бұрын
Great video, however I still encountered an issue, I am using standart Third Person controller and my client still not moving even after I put Client network transform on it (. EDIT: okay, small update here, I... think at least, I was able to streamline the problem and the it seams like client simply not able to edit any variable even though Client Network transform is on object AND Server authority turned off. EDIT2: please show how to encorporate this netcode with Starter Assets input (Third person), this thing is giving me so much headache it is just crazy.
@Groumpif
@Groumpif Жыл бұрын
I had the same problem. I noticed that the Control Scheme of the player input was set to Xbox Controller on the client but was set on keyboard/mouse on the server. So I forced the control scheme of player input using the method SwitchCurrentControlScheme of the PlayerInput and it's now working as expected. I have no idea why the second player added was set to Xbox Controller.. There might be a better solution.
@ruslanagadzhanyan2753
@ruslanagadzhanyan2753 Жыл бұрын
@@Groumpif YEAH, for real, I just tried to plug in my XBOX controller and now client can move... thanks for the hint brother.
@skudfisher
@skudfisher Жыл бұрын
@@Groumpif I know you wrote this months ago but thanks so much for this reply. Just saved me a lot of headache figuring out why my clients wouldn't move with mouse and keyboard.
@rafbanaan
@rafbanaan Жыл бұрын
Thank you for the effort! Really love your tutorials. They are allows straight to the point and you learn a lot :)
@Parwezh
@Parwezh Жыл бұрын
Man I can’t tell how much I appreciate this. Thanks a ton man! 🔥
@user-qg1zn3mx6b
@user-qg1zn3mx6b 6 ай бұрын
[Netcode] [DestinationState To Transition Info] Layer (0) does not exist! how to fix it
@TheMaarten04
@TheMaarten04 6 ай бұрын
I have the same error and can't seem to find a fix. I will be waiting here with you :D
@timsmith4355
@timsmith4355 5 ай бұрын
Same here
@timsmith4355
@timsmith4355 5 ай бұрын
Hello, I fixed this by using blend trees to transition between animations.
@Mouquette
@Mouquette Жыл бұрын
Already made a game with NGO, but I must admit, this video would have helped me a lot. I'm really waiting for the next video about all topics around relay, lobby, matchmaker and game server hosting
@btarg1
@btarg1 Жыл бұрын
This looks SO much easier than any previous way you had to do networking. Compared to Mirror and Photon this is extremely easy!
@chuckiee3
@chuckiee3 Жыл бұрын
Thank you for your efforts! Always quick to provide resources when they are sparse 💛
@ishan9050
@ishan9050 Жыл бұрын
This content this quick and that too not behind a pay wall... Can't thanks enough man. Keep it up
@theashbot4097
@theashbot4097 Жыл бұрын
I just went to unity's Offishall Unite2022 conf. in Austin tx. and they recommended your video to learn netcode for game objects. you are a Rockstar.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Oh wow really? That's awesome to hear, I'm glad people find the video helpful!
@lakemonstergames32
@lakemonstergames32 Жыл бұрын
This video is a goldmine of resources and information, thank you so much!
@DavidZobristGames
@DavidZobristGames Жыл бұрын
Thank you so much! That was epic. Looking forward to the hosting options video too!
@UnityDevJOY
@UnityDevJOY Жыл бұрын
I've been waiting for this. Thank you!!!
@Macronaught
@Macronaught 11 ай бұрын
Thanks for all your hard work in creating this! It's really helpful.
@galahad4514
@galahad4514 Жыл бұрын
Great video! you always make it sound so simple. I'm currently trying photon fusion that is very similar, so it will be easier to try this unity tool. Thanks!
@morningstar7071
@morningstar7071 Жыл бұрын
definitely the best unity related tutorial I have ever seen.
@fiveskills5002
@fiveskills5002 Жыл бұрын
Love The tutorial! An mini FPS with netcode for objects will be gold for your channel! because the most searched tutorials on youtube for unity are FPS.
@suebphatt
@suebphatt 11 ай бұрын
been watching this channel videos and always wonder how one person would developed this much GODSENT SKILL of simplifying and instructing complex things.
@CodeMonkeyUnity
@CodeMonkeyUnity 11 ай бұрын
Thanks for the kind words! I'm always trying to improve the way I teach, I believe I've improved quite a lot since my first video 5 years ago, who knows where I'll be in 5 more!
@kristianthaler6525
@kristianthaler6525 Жыл бұрын
I've been trying and failing for months to figure out search algorithms and data structures for turn-based strategy game, so I jumped at your course the moment I saw it. Easiest $20 I ever spent.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I hope you're enjoying it! Thanks!
@kristianthaler6525
@kristianthaler6525 Жыл бұрын
@@CodeMonkeyUnity I really like the challenges where you have us pause and try and work out the solution ourselves. It's really rewarding to solve a problem on your own.
@narmjep5674
@narmjep5674 7 ай бұрын
Thanks a lot for the video! I didn't realize networking could be so simple. This makes developping multiplayer games less intimidating.
@CodeMonkeyUnity
@CodeMonkeyUnity 7 ай бұрын
Thanks for the super thanks! Yeah nowadays thanks to these awesome tools it is insanely easy to make multiplayer games compared to how it was previously. Best of luck with your games!
@davestomper3428
@davestomper3428 Жыл бұрын
Hey Code Monkey Awesome video on multiplayer I just purchased you full course man hoping to see a lot of multiplayers stuff in there as well keep up the good work man
@untilisee
@untilisee Жыл бұрын
Thanks a lot. This is an excellent starting point to deep into online game development!
@estebangeorgenunezmoran7992
@estebangeorgenunezmoran7992 Жыл бұрын
Thank you for that I was waiting for it, and that nice explanation in 1 hour great!
@SanyaBane
@SanyaBane Жыл бұрын
Thank you very much. Exactly time when I slowly start to look in direction of multiplayer
@blupetersilie
@blupetersilie Жыл бұрын
I actually thought this tutorial would be for some more advanced programmers. But you actually explained everything extremly well :D.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
I'm glad you found it easy to understand! Thanks!
@techbear82
@techbear82 Жыл бұрын
Wow you really did it. I thought this was going to be another Udemy one. Bless you for putting this on YT ❤️
@rehaanmazid2435
@rehaanmazid2435 Жыл бұрын
Just the perfect explanation with the perfect hands on tutorial!
@alessandrovarisco9162
@alessandrovarisco9162 Жыл бұрын
I loved this tutorial, I was learning Network for GO when it was in beta, and things wheren't always this clear. Thank you so much. In this tutorial you decided to trust the players and make the game Client Authoritative, I was wondering if you will ever show us how to make the same project making it compleatrly Server Authoritative, I know you've shown us network variables and Server Rpcs, but if it is possible I would like to see a project made like this and not only some examples.
@alijaras
@alijaras Жыл бұрын
WOW 1 hour tutorial video! That must have took a lot of time and effort. And I'm sure It is a great video since it was made by Code Monkey. Good Job ^_^
@jamesderaja
@jamesderaja Жыл бұрын
Really thanks. Awesome video. I was waiting for a similar video for a very long time.
@ljoraanstad
@ljoraanstad Жыл бұрын
Phenomenal video. Bravo! Excited for more videos related to this.
@MarekNijaki
@MarekNijaki Жыл бұрын
Awesome video! Finally understood what are those RPC calls!
@castlecodersltd
@castlecodersltd Жыл бұрын
I really enjoyed this. So much so that I'm going to give it a go tomorrow. Thanks.
@millerdong7478
@millerdong7478 Жыл бұрын
Best Netcode tutorial! It's really concise and helpful
@accountdua9375
@accountdua9375 Жыл бұрын
I'm busy right now.. but this will surely be in my wait list!!!! THANKS
@michaelbutz284
@michaelbutz284 Жыл бұрын
I have tried to set up a Linux server using this tutorial. At first I failed and I had to search for a long time until I found the solution. In retrospect, this was very simple. Maybe one or the other will find this information helpful. In the NetworkManager under UnityTransport you also have to specify the IP Addresses under Server Listen Address. If in doubt just use 0.0.0.0 to use all IP addresses.
Making a MULTIPLAYER Game? Join your Players with LOBBY!
52:55
Code Monkey
Рет қаралды 128 М.
They made a game about philosophy...
23:19
Real Civil Engineer
Рет қаралды 85 М.
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
LEARN TO MAKE A MULTIPLAYER GAME WITH PHOTON FUSION IN 2024!
19:48
7 DEVS Make a GAME without COMMUNICATING! (centipede edition)
17:16
Blackthornprod
Рет қаралды 1 МЛН
You Can Make The Popseidon Mermonkey Ability INFINITE!? (BTD6)
22:22
How To Do Client Prediction [Unity Tutorial/C#]
11:46
Ajackster
Рет қаралды 29 М.
How far can you get using ONLY Mermonkeys? (Bloons TD 6)
15:13
MackanRules
Рет қаралды 12 М.
Unity 3D - How to examine objects with mouse input
8:53
LearnWithYas
Рет қаралды 3 М.
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 195 МЛН