❤ Watch my FREE Complete Multiplayer Course kzbin.info/www/bejne/bZjPdKZ8bsupadU 💬 This was one of the most requested UGS tutorials, I hope you find it useful! Best of luck with your Multiplayer games! ✅ Learn more about Lobby and UGS on.unity.com/3XdKEd7 🌍 Get the Project Files unitycodemonkey.com/video.php?v=-KDlEBfCBiU 📝 Lobby Docs on.unity.com/3OtC0Du 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 👍 Learn to make awesome games step-by-step from start to finish. 🎮 Wishlist my Next Steam game! cmonkey.co/totalworldliberation 🔴 RELATED VIDEOS 🔴 COMPLETE Unity Multiplayer Tutorial (Netcode for Game Objects) kzbin.info/www/bejne/aarYc4J4aLulec0 Multiplayer through FIREWALL with Relay! (Unity Gaming Services) kzbin.info/www/bejne/o6Szf31omN2KnNk What is Unity Gaming Services? kzbin.info/www/bejne/gKimnXaZZ8SteZo EASY Console! Run any Command! (Add Cheats, Set Gravity, Spawn Enemies Quantum Console Asset Review) kzbin.info/www/bejne/mIDJZ3agpdqGfNU Simple Text Input Field Window in Unity (Submit Score, Name) kzbin.info/www/bejne/ap-Zg4duZZqlecU
@coryscustominstalls7168 Жыл бұрын
I found myself returning to this video often to refresh my memory when building my lobby I wrote down all the time stamps to the sections maybe some one can also use these... 1:54 install packages 2:06 setup services 3:08 script creation / service initialization 5:46 create lobby 8:18 search for lobbies 11:17 implement lobby heartbeat 13:22 add filters to search for lobby 16:55 join lobby by id 18:48 creating lobby options 20:12 join lobby by code 21:16 quick join lobby 23:48 print players 28:06 player creation refactoring 32:33 update game mode 37:30 handle update polling 39:56 updating player names 41:34 leaving lobbies 42:40 kicking players 44:40 transfer host 46:02 deleting lobbies
@JohnGamble Жыл бұрын
Thank you! I have referenced this video countless times while implementing Lobbies in my game. It would be great if these were added as chapters to the video.
@NedjmouBlaxword10 ай бұрын
Thanks
@eze-rivals2 жыл бұрын
As someone who's been working with Unity professionally, you never cease to give really great reference to new services and quick implementation, keep up the hard work!
@CodeMonkeyUnity2 жыл бұрын
Thanks for the kind words! I'm glad you found the videos helpful!
@arvydazo4203 Жыл бұрын
when lobby host left the lobby, for example wifi disapears or game crashes, lobby disapears after 30s from the list, but players in lobby stays endefinetely with no warning that lobby no more exist. is there a way to change lobby owner when original owner is offline?
@RicardoSanchez-es5wl3 ай бұрын
@@arvydazo4203I think host migration is in unity 6
@TheAsbj0rn2 жыл бұрын
I have returned to this video approximately 20 times over the last three weeks. It is amazing, giving only what we need and no confusion. I'm actually using what I learn to develop a unity package that incorporates everything here with steam, automatically setting player icons and names and such. Thank you very much for this tutorial, it would have taken me months without
@CodeMonkeyUnity2 жыл бұрын
I'm glad the video has helped you! Best of luck with your game, thanks!
@SzaboB332 жыл бұрын
I just started game developing and it seems like all my ideas that I am excited about are all multiplayer, seems like I timed my start right, thank you for these valuable videos!
@CodeMonkeyUnity2 жыл бұрын
Heh nowadays making multiplayer games is easier than ever so that's great timing! I remember when I added Multiplayer to my first Steam game, I had to build the entire Lobby Master Server infrastructure from scratch myself, it was very painful and very easily broken. Really awesome that nowadays there are all these tools you can easily use!
@ergicela44202 жыл бұрын
@@CodeMonkeyUnity does a multiplayer game cost , or how much you need to spend to create a multiplayer game by your self?
@phlips82542 жыл бұрын
@@ergicela4420 The lobby system in this tutorial is done with the base Unity system and is free as long as you don't use too much data (unless you have a lot of players this won't happen), then the hosting of the server is done by the player that is the host of the lobby. Because of this you don't need to run your own servers and the entire system is free to use. So no you don't have to pay to add multiplayer
@sir.niklas20902 жыл бұрын
Honestly Multiplayer is still difficult get some practice in, not years but just understanding.
@Wonder_Verse_Tech2 жыл бұрын
Was going to sleep, code monkey's notification came, so I am here ... Postponed sleep for next 52 minutes 😁
@CodeMonkeyUnity2 жыл бұрын
Heh don't worry, the video will still be here in the morning!
@Wonder_Verse_Tech2 жыл бұрын
@@CodeMonkeyUnity 😅Yeah , But you can understand the passion for game Devs .
@padamgupta69412 жыл бұрын
@@CodeMonkeyUnity अरे कुछ नहीं मंकी भाई यह सो गया था तुरंत ही मेरा रूममेट है ये
@Wonder_Verse_Tech Жыл бұрын
@@padamgupta6941 abe 🤣 ... Accha screenshot lagane ki wjh se dhundh liye tum... Bhkk...
@magnushlund Жыл бұрын
Legend says that he still hasn’t slept. Been watching codemonkey nonstop ever since.
@ezrahuffman Жыл бұрын
Just a note in case some is facing the same issue. If you are using the editor to test (I am using parrellels sync package), the heartbeat might stop when you unfocus the editor window. You can change it in Edit -> Project Settings -> Player -> Resolution and Presentation -> Run In Background. Also the anonymous login will create the same id for both players when logging in by default. You can either clear the session tokens or use different profiles to get around it.
@durvesh0072 жыл бұрын
Really appreciate this detailed explanation 👍
@roubatov2 жыл бұрын
Yes Code Monkey, YES! I'm working on a VR artwork which uses multiplayer, but I had no idea how to setup the lobby, but with this everything is working just fine! Thank you for everything and good luck with the rest!
@racistpixel1017 Жыл бұрын
how dud you made so all the players would be spawned to gameplay scene ?
@Nounsi_Dev9 ай бұрын
@@racistpixel1017 have to make it work with netcode for gameobject
@evanstaylordigital82322 жыл бұрын
Awesome video. I have come back to this several times while prototyping my own lobbies implementation. Would be super helpful if you included chapters!
@arvydazo4203 Жыл бұрын
when lobby host left the lobby, for example wifi disapears or game crashes, lobby disapears after 30s from the list, but players in lobby stays endefinetely with no warning that lobby no more exist. is there a way to change lobby owner when original owner is offline?
@Neo-Meo-X2 жыл бұрын
This is more than an amazing tutorial. thanks for sharing this. Looking forward to watching more multiplayer tutorials!
@captainnoyaux2 жыл бұрын
I'm working on the multiplayer version of my game, nearly finish this is coming at the right time :D Thanks a lot
@kpr26 ай бұрын
I always appreciate your tutorials & this one's making all of this seem far easier than I'd have expected. Keep the great stuff coming!
@CodeMonkeyUnity6 ай бұрын
Not sure what timestamp you're referring to, what two different variables? You mean lobbyName and maxPlayers? It's to avoid using magic numbers kzbin.infoCQ5xHgRZGQo Sure, you can use a coroutine instead of a float timer. Personally I prefer float timers because I dislike the cumbersome structure that coroutines force you to use. You need a MonoBehaviour, need IEnumerator, need yield return, need StartCoroutine(); whereas with a float timer you just have a simple number. But that's just personal preference.
@kpr26 ай бұрын
@@CodeMonkeyUnity Apologies. By the time I got to the end of the video it more or less made sense & I edited the comment, haha 😆. I was referring in particular to the lobby, hostLobby, and then joinedLobby variables. For the sake of "safety", I followed most of your instructions, though I did swap out the Update timers for coroutines as I'm just used to them. My head's swimming a bit as the last 20 minutes of the video really ramped things up a notch, but I was able to keep up well enough & everything looks good! I'll certainly be grabbing your project files to check for reference as I'd like to see how you implemented the UI functionality, particularly for kicking players & such. Thanks so much for all of the amazing tutorials (and I always use Codemonkey10 at checkout now, so many additional thanks for that, too). You rock! \m/(>.
@zanuka97658 ай бұрын
If like me you're a newbie and get the error : "player is already a member of the lobby" while trying to join a lobby from different instances of the game, you have to find a way to differentiate the two players (host and client). One way is to change your authentication method like this : private async void Start() { var options = new InitializationOptions(); options.SetProfile("Player" + Random.Range(0, 1000)); await UnityServices.InitializeAsync(options); //
@alexdev447 Жыл бұрын
Love your content. This is the best way to learn new concepts as opposed to reading documentation and thousands of lines of code in example projects. Your videos are extremely helpful and you saved my ass countless times. Thanks!!
@alec_almartson2 жыл бұрын
Awesome. 👍🏻😁 You made it look easy... which is the Best a Teacher can do. I will try it on my future Prototype. Thank you for making this video. 😄✌🏻
@lemetamax2 жыл бұрын
Yeaasss! Will watch early tomorrow morning. This video's thumbnail gave me a game idea: a superhero game with Code Monkey as the titular character.
@CodeMonkeyUnity2 жыл бұрын
Heh that would be fun!
@Crazytm242 жыл бұрын
This is exactly what I needed, thank you!
@RigidDecay2 жыл бұрын
Thanks so much for making this man, I’ve been waiting 😅
@o2dyt2 жыл бұрын
Amazing tutorial. I followed along and got everything working. Thank you!
@Hhuxx1 Жыл бұрын
the Join player using Id didnt work is something wrong?
@o2dyt Жыл бұрын
@@Hhuxx1 Hey! What's the error?
@Hhuxx1 Жыл бұрын
@@o2dyt Id didnt exist
@allaboutpaw939613 күн бұрын
thank you for explaining. I had already a solution but I was blindly using the functionality, now I understand :)
@notlaw15672 жыл бұрын
Thanks for showcasing this package. As always a really useful tutorial! It gave me thoughts about if this is how channels are implemented in mmorpg's.
@bloobyjoobyjoob89492 жыл бұрын
Yus! This is exactly what I needed! Any chance you could do Vivox next?
@CodeMonkeyUnity2 жыл бұрын
Yup it's on my list to research
@bloobyjoobyjoob89492 жыл бұрын
@@CodeMonkeyUnity yus thanks you so much
@JasonLovettGameDev2 жыл бұрын
This was gold! Literally just made my entire lobby system for my game just following along
@CodeMonkeyUnity2 жыл бұрын
Nice! Best of luck with your game!
@JasonLovettGameDev2 жыл бұрын
@@CodeMonkeyUnity Thanks man! Appreciate it!
@captainnoyaux2 жыл бұрын
@@CodeMonkeyUnity Same ! Thanks a lot I'll definitely support you when my game generates more money !
@ArveKarve Жыл бұрын
how did you made so lobby players would be transfered to actual gameplay scene?AC
@hralpuh Жыл бұрын
Im also trying to work that out, and have been through several days... when I download the project files they seem to be a bit broken, so its hard to figure out how the UI gameobjects should be constructed.
@josephderosa55692 жыл бұрын
Yes!!! UGS tutorials are amazing! Thank you so much! Can you please make one for Unity Game Server? I cannot find it anywhere on the net outside of docs and a video showing a practical example would be extraordinarily helpful, not just to me but to MANY others.
@CodeMonkeyUnity2 жыл бұрын
Yup Game Server Hosting (Multiplay) and Matchmaker are two other tools I want to research
@S_Tadz Жыл бұрын
Note that if the 30 seconds lifeapan of the lobbies bugs you, it can be changed via the UGS dashboard up to an hour (3600 seconds). Probably negligeable, but helps send less data, which is always good.
@CodeMonkeyUnity Жыл бұрын
Oh that's interesting, I don't remember seeing that, must be a nice recent addition
@arvydazo4203 Жыл бұрын
@@CodeMonkeyUnity yas but lobby host leaves the loby, noone can connect to that lobby and it just stays there in the list with ghost players
@AntAptive Жыл бұрын
Could you possibly make a tutorial on how to make the UI for the lobby and how to connect it to this? I've followed this tutorial but I'm not quite sure how to do that. The main problem I'm having is I'm not quite sure how to get the names of the players in the lobby, but I see you set it up to do that in your UI. Regardless, thank you for making these tutorials for us!
@GreazyController2 жыл бұрын
Yes, finally a great tutorial on this!
@devonn62 жыл бұрын
Finally ...😍😍 You are awesome!
@klevialushi5712 жыл бұрын
This video was needed since i was thinking of implementing the same thing in a 2d game that im making, thanks!
@MrMrn872 жыл бұрын
I would love some insight in Steam intergration with Unity Multiplayer Networking
@rootbindev2 жыл бұрын
i love your multiplayer tutorials
@emberdragons8244 Жыл бұрын
Thanks, that was really helpful
@playnowgaming46282 жыл бұрын
Really helpfully video and appreciate your work bro ❤
@TheDudeOriginals4 ай бұрын
The Greatest Of all times ❤ Thanks for your efforts and I hope you’ll see my comment (Your biggest fan yasser)❤
@CodeMonkeyUnity4 ай бұрын
I'm glad the video helped you!
@designer.trifonov Жыл бұрын
Its super lesson! Thanks! :)
@rajsah46672 жыл бұрын
🤩 great tutorial
@nemzaki Жыл бұрын
If you are new to unity these tutorials will be somewhat challenging , Because he's using his custom UI stuff instead of unity built in stuff. These tutorials can be simplified a lot.
@CodeMonkeyUnity Жыл бұрын
What custom UI stuff? I'm not even using any UI for the most part of the tutorial, only made a custom demo for the end
@jaybehl75675 ай бұрын
@@CodeMonkeyUnity how can I switch to the game scene for everyone after creating the relay? Please respond this has been bugging me for the past several weeks
@davidgauffindahlin6982 жыл бұрын
You are the best
@Synith192 жыл бұрын
Wooooo another multiplayer video!
@DP_12 жыл бұрын
thank you, you helped me a lot 😲🙂
@sir.niklas20902 жыл бұрын
Yall, just a tip don't name your script "Lobby" since its a keyword it will give you head aches... :D
@afrikaansedude25258 ай бұрын
I knew i shouldn't name i Lobby but yet still my smooth brain did exactly wat i told it not to do..😂
@jaa51975 ай бұрын
You also can't name Players "Player" because Player already exists in the lobby package
@sadryan4013 Жыл бұрын
Anyone else having an issue where the player class exist but also doesn't exist at the same time?
@-Bill-Clinton- Жыл бұрын
awesome tutorial!
@CodeMonkeyUnity Жыл бұрын
I'm glad you liked it! Thanks!
@LegendaryCombatForce Жыл бұрын
How to add search bar so that many players playing the game have option to search the name of any player and add him as a friend instead of lobby
@connerreynolds6142 Жыл бұрын
Great tutorial very clear! Did you make a video on how to transition from the lobby scene like the one you created to the actual multiplayer gameplay scene?
@CodeMonkeyUnity Жыл бұрын
You can just sync some Lobby data, set it to 0 by default then set it to 1 when you wnat to start the game, that's waht I did in my complete game kzbin.info/www/bejne/bZjPdKZ8bsupadU
@lazarbecic2199 Жыл бұрын
Thanks a ton!
@stefancc8311 ай бұрын
Super cool video. How did you manage to run 2 builds in Unity? Thanks!
@CodeMonkeyUnity11 ай бұрын
They're not both inside Unity, only one is in Unity the other one is a standalone build
@mohamedmusthafa1057 Жыл бұрын
Developer's Gem ❤
@mjkkaya6056 Жыл бұрын
How do you achieve to show so many features in a single video? This is awesome!
@shrekkuboi9642Күн бұрын
I seem to be having an issue with the downloaded files of the project. When using the tutorial scene in the downloaded project, the lobby doesn't show up after I create it. Everything else in the video works perfectly, I was just having issues with the downloaded scene with the new UI
@Ionixification2 жыл бұрын
Ur awesome man
@IzzyYoutubeАй бұрын
I NEED to know how you do these keyboard shortcuts in your code
@somegamer7958 Жыл бұрын
Couple of minor changes I'd make - using multiple lobby variables is a bit confusing. You really just need one. Switching them back and forth isn't necessary since one client is going to be be a part of one lobby at a time. Also, logging into a lobby via code. I think for a tutorial it makes more sense to log in by lobby Id, because that's a value you can actually get. Only the host of the lobby gets access to the lobby's code.
@CodeMonkeyUnity Жыл бұрын
What do you mean multiple Lobby variables? There's just one member variable which is set whenever a function changes it, you need to do that since the variable won't update by itself. If you want to see it as part of a complete game I used this in my complete course kzbin.info/www/bejne/bZjPdKZ8bsupadU
@bluzenkk2 жыл бұрын
Thanks~ very helpful ~
@TUPGD10 ай бұрын
figured the issue but dont see a fix....When you press Authenticate without changing the name from Code Monkey, it will not authenticate nor let you go back...
@s1m1ng7on2 жыл бұрын
I have a question - as you said in this video, using netcode for game objects, relay and lobbies makes for a seamless multiplayer experience. What is the right video to start watching in order to do that? I don't really understand how they differ and how they work together.
@CodeMonkeyUnity2 жыл бұрын
Each of the videos focused on each tool. This one is the lobby video Here is the Relay unitycodemonkey.com/video.php?v=msPNJ2cxWfw And NGO unitycodemonkey.com/video.php?v=3yuBOB3VrCk
@muerrtee Жыл бұрын
i am getting this error while setting up the lobby system Error CS0029 Cannot implicitly convert type 'Unity.Services.Lobbies.Models.Lobby' to 'Lobby'
@CodeMonkeyUnity Жыл бұрын
Did you name your class Lobby?
@muerrtee Жыл бұрын
@@CodeMonkeyUnity yep i named it the same took me a while to realize now everything works totally fine thanks the tutorial is really good
@LegendaryCombatForce Жыл бұрын
Please tell that how can we make a functional search bar on which if we search then it will show the list of online multiplayers And if we click on any player it will show option "add friend" if we click on add friend it will be added to our friends list
@DrWoofOfficial Жыл бұрын
Do you have a database set up to store info of all players?
@jean-michel.houbre Жыл бұрын
Good afternoon! In anticipation of the looby part of the "Learn Unity Multiplayer" video, I just finished the "Making a MULTIPLAYER Game? Join your Players with LOBBY!" video, a very clear and very informative video as usual. Thank you for the passage concerning the prices, I had already read it, but it is reassuring for a non-English speaker to have an additional interpretation. I have many qustions : a) when all players leave the lobby, we get a bunch of errors in the console: - [Lobby]: LobbyNotFound, (16001). Message: lobby not found - HttpException`1: HTTP/1.1 404 Not Found How to manage them? b) I didn't understand why we have 2 lobby variables (hostLobby and joinedLobby). We only have one lobby, don't we? c) At 47:20, you have a using Unity.VisualScripting clause. This happened to me from time to time, and I got into the habit of uninstalling several packages installed by default by Unity: VisualScripting, Visual Studio Code Editor and JetBrains Rider Editor. I have the impression (at 90%) that Visual Studio offers me fewer functions for autocompletion. I would like it to be automatic, but I admit that my first attempts were not convincing :) Thank you very much for this video !
@jean-michel.houbre Жыл бұрын
Connection with Codemonkey lost ... I hope you're doing well.
@davidwusoftdev Жыл бұрын
For (a) you would need to set the lobby to null in the catch section of the code, so that the Update function stops the heartbeat to an already deleted lobby. For (b) you can probably modify the code to only use joinedLobby. I'm guessing CM uses two different variable names for teaching clarity. I have no idea about (c). If you don't need that reference in your code, just delete the line. You should keep Visual Studio Code Editor package if you're using the VS IDE to write your code though, I think it's needed for proper integration. Good luck!
@jean-michel.houbre Жыл бұрын
@@davidwusoftdev Thanks!
@VladaPersonal Жыл бұрын
This great tutorial could really use chapters.
@SuperKREPSINIS Жыл бұрын
i have small issue. im using your lobby assets you provided. when player leaves lobby or relay. or shuts down game completely, he stays in the lobby and cant reconect. when im testing lobby always says it has two players, so the host and testing build. i also keep lobby on dontdesroyonload when moving to gameplay scene, just to keep lobby active for new players to join, but i dont think it makes this problem. also in dashboard in lobby i changed so if player is disconected for 10 seconds, he would be removed from looby, it was set on 2 minutes, and still it doesny work, players stays in the lobby no mater what.
@goldenapple801 Жыл бұрын
Is there any more detailed description on how you created the lobby UI? I have watched your other videos but still do not manage to replicate it.
@stefancc8311 ай бұрын
do you have any video showing how to transfer data between host and guest and both of them getting notified on events? Usecase: guest changes its data and host gets notified about changes and viceversa.
@md3d5198 ай бұрын
im curious on how you made the chat and commands , a tutorial on that would be appreciated
@Overdrink78 ай бұрын
It's a unity asset If I remember well. And he probably explained it in a previous video
@Overdrink78 ай бұрын
See the previous video of the playlist
@arsalanasif8354 Жыл бұрын
Loved the video! Just wanted to ask, why don't you like coroutines? I thought it was standard procedure to keep most of your logic inside coroutines and functions.
@CodeMonkeyUnity Жыл бұрын
Personally I don't like the pattern they force you to use. You need to use a MonoBehaviour, you need to StartCorouting(), you need to make a function that return IEnumerator, you need yield return I find that whole pattern to be needlessly convoluted. But they work perfectly fine, so if you like them then by all means use them
@arsalanasif8354 Жыл бұрын
@@CodeMonkeyUnity Those are definitely valid reasons. I guess I'm just more used to them now. Find it much easier to hold execution and sync with fixed updates in coroutines. Just wanted to know if I was missing something here.
@OneTime_12 Жыл бұрын
I understand you mentioned how to make the players on team, but it would be great for you to show us. Im not that good of a coder and im lost most of the time. Anyway to make a video on selecting team both manual and random, adding friends, creating parties, thing like that. Seems like alot for me but it might not be that big of a task for you. Thanks even id you say no lol !!
@Maskedmous2 жыл бұрын
Lobby services with 10 gb is neat. Free authentication, remote config and cloud storage. Relay services however can become quite costly**. let's say your game is $15. 30% goes to steam, $5 for simplicity. Then you have your own take of $5. The rest $5 goes back into the game. which means ($5 / $0.16) / 12 ≈ 2,6 years. After that you're paying it yourself to support your own games networking. By then you require another monetization feature just to keep the game running. Or revert back to Direct IP which is troublesome for most players to set up. Most of them don't even know how to access a router / modem let alone configure it for some game. I'm ignoring bandwidth here, but that also is quite costly when you go above 150 gb of data. Multiplayer is great, just not the costs that come with them. ** Sure there are caveats and this calculation is a worst case scenario 100% playtime. It still feels expensive. Perhaps my view on it is too extreme.
@CodeMonkeyUnity2 жыл бұрын
Your math is a bit confusing, you're assuming every single player will be online at the exact same time playing 24/7 for 2.6 years, that is an extreme scenario that doesn't really ever happen. Remember it's Concurrent users, not just Users. As an example, my own game Battle Royale Tycoon, which was a decently successful release (for an indie dev) only had a single month above 50 CCUs with 75. So if the game was multiplayer it would have costed me $4 while it sold over $100,000 So to me the math seems really good. If you have thousands of CCUs then your game is a mega-hit which sold hundreds of thousands of copies and those players will not play 24/7 for 2 years.
@Maskedmous2 жыл бұрын
@@CodeMonkeyUnity That makes a lot more sense. Like I mentioned with the '**' Worst scenario with 100% playtime. But you're right not everyone will play every day for 2 years long. Thanks for explaining
@RoffeDH Жыл бұрын
I can't even get past the intro before I get an error I can't find a resolution for: "Cannot implicitly convert type 'Unity.Services.Lobbies.Models.Lobby' to 'Lobby'" The code: Lobby lobby = await LobbyService.Instance.CreateLobbyAsync(lobbyName, maxPlayers); I even copied it directly from the website and still got this error. What am I doing wrong? I've added all the exact same "using" at the top of the script even.
@CodeMonkeyUnity Жыл бұрын
Sounds like you already defined a class named Lobby in your project
@RoffeDH Жыл бұрын
@@CodeMonkeyUnity fuck... I did 😅 every time', the simple and easy babe is already taken and I spend days to try and figure out why it didn't when. Thanks!
@im_an_intern_unity_dev4 ай бұрын
haha u saved me
@Lifeport-z Жыл бұрын
How would I implement this into vr?
@MarekNijaki2 жыл бұрын
Very very good video
@harsimargawri8113 Жыл бұрын
I have a question about constructors and initialisers, like at 31:08, u have used curly brackets to pass in the arguments for createLobbyOptions, but on the other other, in some cases, just normal round brackets are used for passing in arguments. How does it exactly work? Thanks for the help!
@CodeMonkeyUnity Жыл бұрын
It depends if the constructor has parameters or not. But regardless of whether it does or not you can always use curly brackets to set public fields
@illuminatidad5 ай бұрын
Can you help me with this simple problem? How do I get the player data saved in the lobby, such as name and loadout, in the game when I actually run it? For example displaying the users name to other players? I know it's probably simple but an explanation would be awesome.
@CodeMonkeyUnity5 ай бұрын
Store it in a variable locally on the lobby owner, have that lobby owner start hosting the game, wait for all to be connected, send a ClientRPC to send that data to all clients Or you don't even need the host to send anything, just store in a local variable for each connected player since they know the lobby state
@illuminatidad5 ай бұрын
@@CodeMonkeyUnity I'm so sorry could you explain it in more detail? I guess I don't entirely get how the client rpcs work here, like save the variable in the lobby script or the player script? Also how do I connect the PlayerId from the lobby to the networkmanager client id? Are they the same?
@SMORIGINALS2 жыл бұрын
My this question is out of this video---- Q- concept of making jungle marble blast game....how is work....? Could you make any video for this....?
@TarrenHassman Жыл бұрын
I looked at the basic coroutine and couldn't figure out why you didn't like the pattern until I tried to make it async lmao
@warfarecreations3792 жыл бұрын
Best ❤️
@ozalpm Жыл бұрын
You are a lagend!
@mohamedmusthafa105711 ай бұрын
Can u Please Explain I can See QuickJoin Method On Lobbies Class And LobbyServices class as well whats Difference both?
@LegendaryCombatForce Жыл бұрын
Can you please tell me how to add search button in it
@CodeMonkeyUnity Жыл бұрын
I covered the filters at 13:22
@LegendaryCombatForce Жыл бұрын
No I just ask that how add search bar instead of lobby like I have many players playing online game and one of them want to add another as a friend and he will search his name on the search bar and then add him as a friend
@linkrider2302 Жыл бұрын
My question is, I managed to connect, how can I switch to the game scene and how can I host it in the lobby via netcode? Or is it automatic?
@andrubaskara4879 Жыл бұрын
Hi, have you found the solution?
@jaybehl75675 ай бұрын
update please
@JesseTheGameDev2 жыл бұрын
I'm getting a bug when I run my game in a standalone build that causes the player to never leave the lobby if I close the game while still inside it. I can force leave the lobby, but closing the game seems to leave the lobby open forever. Any experience with this bug or an idea on how to fix it? UPDATE: I think calling delete lobby or remove player from lobby from OnApplicationQuit works, but only if you don't do it asynchronously (so no async/await in the call).
@kickr-i7d10 ай бұрын
how to transfer host player in to another client when host leave the from game scene please asap reply
@arvydazo4203 Жыл бұрын
when lobby host left the lobby, for example wifi disapears or game crashes, lobby disapears after 30s from the list, but players in lobby stays endefinetely with no warning that lobby no more exist. is there a way to change lobby owner when original owner is offline?
@jihadrouani55252 жыл бұрын
Massive thanks for this multiplayer series, and super excited for the upcoming one, I hope you make more and more videos or even courses on multiplayer, DOTS, ECS... I'm sure they'll be very valuable. And I hope I can support with more sizeable donations in the future, being an indie dev making games with nothing released yet is kinda hard on my ressources 🥲
@CodeMonkeyUnity2 жыл бұрын
Thanks for the super thanks! Best of luck in your game dev journey!
@UnityDevJOY2 жыл бұрын
I'm using ParrelSync to quickly test the game in another Unity Editor. But by doing this, the second player is assigned the same ID at the start. This means that I keep on getting the error "LobbyConflict, (16003). Message: player is already a member of the lobby." when trying to join. Is there any workaround?
@CodeMonkeyUnity2 жыл бұрын
You need to use a different name when Authenticating when running on the same machine, just like I added a input window to give each build a different name.
@UnityDevJOY2 жыл бұрын
@@CodeMonkeyUnity Hello! I found a solution right after typing the comment but I think it got automatically deleted because I put a link in it. I used authentication profiles to isolate my players. Here is my Start function: private async void Start() { var options = new InitializationOptions(); playerName = "Player_" + Random.Range(10, 99); options.SetProfile(playerName); await UnityServices.InitializeAsync(options); This way, each player gets assigned an unique ID.
@DiegoAtravesar2 жыл бұрын
@@UnityDevJOY Just want to throw a quick shout out here, I ran into this exact issue on my end during my testing and this helped me resolve it!
@theplaymakerno1 Жыл бұрын
Can you explain this? Where do you actually do this?@@CodeMonkeyUnity
@rafaelbrustolin46879 ай бұрын
I didnt know unity had a high level lobby system like this
@lavimahal82902 жыл бұрын
Make a tutorial for netcode using Steamworks p2p also plz.
@bananaglove20202 жыл бұрын
I would like that too!
@Somiaz Жыл бұрын
How do I even get the UI set up? It seems this was also a crucial part that was missed? Especially since so many changed were made from during the tutorial. It would have been nice to see how to set everything up fully even with basic Unity UI stuff.
@CodeMonkeyUnity Жыл бұрын
In any way you want, every game will have a different UI. If you want to see that step by step I did pretty much exactly the same thing in my free multiplayer course kzbin.info/www/bejne/bZjPdKZ8bsupadU
@romain4088 Жыл бұрын
is it possible to spawn the players in the lobby in the same game with the character they picked using unity netcode?
@CodeMonkeyUnity Жыл бұрын
When you join the lobby you can initiate the NGO connection right away, that's what I'm doing in my multiplayer game, video coming out next Monday
@rucesocial2 жыл бұрын
That's pretty good.
@freecash3474 Жыл бұрын
Can someone help me with how I can create a player data of type int or bool instead of string? 26:37 Do I have to use string?
@Squid_Fat Жыл бұрын
Data = new Dictionary()
@freecash3474 Жыл бұрын
@@Squid_Fat It didn't work it still asks for string for value
@poisht8538 ай бұрын
Thank you for the video!! I have realized one thing that happens sometimes. It might have to do with the fact that most of the code here are async code that when I stop playmode (from testing), time and after the scene changes when exiting playmode - (aka is different to what it was before starting play mode)... usually this is fine as reloading the same scene by clicking in the scene from the project in the editor restores it to what it was before... But I was wondering if this could happen for a build as well? because I had a few times where the camera was getting disabled for no particular reason when exiting playmode and this would be really bad if it happens in a build and remains that way...
@Flem100DK2 жыл бұрын
Shouldn't you return Task instead of void when it's not an event?
@CodeMonkeyUnity2 жыл бұрын
It depends if you want to return any value or not. If you want to return anything at all then yes you need to return Task But if you don't want to return anything then void works fine
@juanalvear65928 ай бұрын
Hello, just using this right now, I added the team selection on my lobby screen but only the player themselves can edit their PlayerData, not even the host can, so how would you work around this?
@TheKr0ckeR3 ай бұрын
Can we test this without relay on across computers from different places? Do we need relay setup to get in a lobby without locally?
@CodeMonkeyUnity3 ай бұрын
Lobby does not need Relay, Lobby is just an HTTP connection so there are no issues with firewalls or NAT. You only need Relay to create the NGO connection
@sameoy6962 жыл бұрын
Games that are the survival of the strongest, and for example, their number is 100. How, if one person remains, a slogan appears that he is a winner, and the game ends
@jonbruenderman5 ай бұрын
Is it possible to use this lobby setup, then on start, spin up a dedicated server? I setup matchmaking, but now I want to add the lobby service instead of waiting for random players to join.
@luckydenzel16 күн бұрын
Do you need lobbies for quick join? Like in a fps game, would you need lobbies or would you handle it with an other thing?
@CodeMonkeyUnity15 күн бұрын
The one scenario where you don't need lobbies is if your players are connecting directly to a target IP, if so they just try to connect right away. But usually your players don't know the target IP, so you need to group them before starting the connection, and that's what lobby does. Either this Lobby or some other method of finding players and passing the connection data between them so they can start the connection. You could build your own sort of matchmaking system with a cloud script that would put players in a pool and group them together to start the connection, but using lobby is much easier
@luckydenzel15 күн бұрын
@CodeMonkeyUnity thanks!
@shmz669110 ай бұрын
How would i make it so the players in my lobby are moved to a round, preferably with netcode since i want to make a FPS