Omg this was so easy this whole time?! Thank you so much, if only we had this video we would have had a working game on the gamejam that was two years ago lmao
I have the problem that if I have more than 2 players, the position of the 3 player is no longer visible in the other clients. Only the host sees everything “correctly”. Unfortunately I cannot understand the problem. Does anyone have a tip for me as to what it could be?
One small query : After lobby, i have to move to the Level Selection scene which selects which level to choose. That level scene is an addressable which is being downloaded from cloud. But net code does not seem to work with addressable scene. Any advice? I am thinking two options : 1) Use RPC to manually load the addressable scene on all clients 2) Make all the contents of the scene an addressable prefab and then include the empty scene in build settings which can be loaded through netcode. Then instantiate the adressable when the scene is loaded by netcode. Thanks in advance 😃
Hi, i was wondering how i could manually set region when hosting, from the unity docs i found out that you can add a region by adding a string to the 'CreateAllocationAsync' the only problem is i don't know what to put in the region string could you please help me out.
Hi, you can simply pass it as the second parameter of that function - CreateAllocationAsync(4, "MyRegion"). I guess you want to setup some dropdown to select the region, then you can add a reference to the dropdown and pass the text value from it as the second parameter.
This is one of the tricky parts of peer-to-peer connection but it is surely possible to solve that. I haven't tried it myself. Check this - docs.unity.com/ugs/manual/relay/manual/host-migration. Or you can use dedicated servers (Multiplay) about which I made tutorial a few days ago.
Hi! I've followed your Series for my Thesis Project and I cannot Say THANK YOU SO MUCH! I've gotten Half my work done originally in amount of short time thanks to you! I do have one question though...Is it possible when after Pressing Host Game, or Join Relay, Can you Host it instead to another Scene? If there is an easy code how, I would really appreciate it! Once again Thank you for your Series and I'm Pushing hard before my deadline! ^_^
Hi, I am glad I could have helped you! Yes that should be simple. I would set the player object with the network manager and relay manager as DontDestroyOnLoad, so you can then transfer them to the other scene (DontDestroyOnLoad(gameobject)). For loading of the scene just add using UnityEngine.SceneManagement and then you can do SceneManager.LoadScene. I hope this helps. Good luck with your project!
Bro your channel offers so much value, please keep it going
Thanks a lot, I will!
Omg this was so easy this whole time?! Thank you so much, if only we had this video we would have had a working game on the gamejam that was two years ago lmao
I am glad it helped! You can use it next time :)
Yo this tutorials are very awesome and you are explaining the things too. Please keep it. I loved your videos
Thank you. More are coming!
Helps me greatly for my game dev class! subbed and waiting for more to this series!!
I love to hear that!
The tutorial is easy to follow and the explain is very clear
Thankyou 😆
I love to hear that! Thank you.
I have the problem that if I have more than 2 players, the position of the 3 player is no longer visible in the other clients. Only the host sees everything “correctly”. Unfortunately I cannot understand the problem. Does anyone have a tip for me as to what it could be?
How are you spawning the players? Have you assigned the player prefab in the NetworkManager?
Great example! Thank you!
I am glad you liked it! You are welcome.
One small query :
After lobby, i have to move to the Level Selection scene which selects which level to choose.
That level scene is an addressable which is being downloaded from cloud.
But net code does not seem to work with addressable scene.
Any advice?
I am thinking two options :
1)
Use RPC to manually load the addressable scene on all clients
2)
Make all the contents of the scene an addressable prefab and then include the empty scene in build settings which can be loaded through netcode. Then instantiate the adressable when the scene is loaded by netcode.
Thanks in advance 😃
Hi, I havent used Addressables with Netcode yet, so I am not sure. I would go with the second approach. Let me know how you solve it!
@@freedomcoding Already started with 2nd approach and it worked.
Thanks for the reply though.
Hi, i was wondering how i could manually set region when hosting, from the unity docs i found out that you can add a region by adding a string to the 'CreateAllocationAsync' the only problem is i don't know what to put in the region string could you please help me out.
Hi, you can simply pass it as the second parameter of that function - CreateAllocationAsync(4, "MyRegion"). I guess you want to setup some dropdown to select the region, then you can add a reference to the dropdown and pass the text value from it as the second parameter.
@@freedomcoding Thanks, is there a list of available regions?
@@Khio890 Yes - docs.unity.com/ugs/manual/relay/manual/locations-and-regions
Good video!!!
Thanks a lot!
How to make a savesystem to multiplayer game in unity? Please Response.
Hi, you can use Unity's tool Cloud Save. I haven't worked with it yet, but soon I will probably get to it.
how to transfer host when host leave the game please help me
This is one of the tricky parts of peer-to-peer connection but it is surely possible to solve that. I haven't tried it myself. Check this - docs.unity.com/ugs/manual/relay/manual/host-migration. Or you can use dedicated servers (Multiplay) about which I made tutorial a few days ago.
@@freedomcoding can u make video on it please i need it
@@kickr-i7d I am putting it on my list. There is still a lot of stuff to cover about Multiplayer in Unity, so maybe some time.
@@freedomcoding please asap do i need it very much
Hi! I've followed your Series for my Thesis Project and I cannot Say THANK YOU SO MUCH! I've gotten Half my work done originally in amount of short time thanks to you!
I do have one question though...Is it possible when after Pressing Host Game, or Join Relay, Can you Host it instead to another Scene? If there is an easy code how, I would really appreciate it! Once again Thank you for your Series and I'm Pushing hard before my deadline! ^_^
Hi, I am glad I could have helped you! Yes that should be simple. I would set the player object with the network manager and relay manager as DontDestroyOnLoad, so you can then transfer them to the other scene (DontDestroyOnLoad(gameobject)). For loading of the scene just add using UnityEngine.SceneManagement and then you can do SceneManager.LoadScene. I hope this helps. Good luck with your project!
is there any code for Relay Manager i can copy and paste? I am having errors.
great video btw.
Hi, here is the code - docs.google.com/document/d/1-L7oYA81WvBn4ZHlzXGgOVkd_3k2wjUK5IWE9dwktCk/edit?usp=sharing. I am glad you liked it!
relay is free?
Yes up to 50 concurrent users. You can find more info about the pricing here - unity.com/solutions/gaming-services/pricing.