Комментарии:
I really enjoyed this, thank you 🙂
Ответитьgot "'PlayerLength.onNetworkSpawn()': no suitable method found to override"
Ответитьi got a error saying after getting the pacage: "Asembly with name ......"(the name of the package) alreadyy exists, for those of you who also got this, just open file explorer and open the project file and delete all the projects except Assets, Project Settings, user Settings, and the .sln
ОтветитьOnNetworkspawn seems very buggy for objects pre placed in the scene documentation says you can replace objects but when pressing play mode it does not work reliably...
Ответить"Don't drink coffee" 🤣
ОтветитьThanks for 106 subscribers completed ❤🎉
ОтветитьHi, can you help me? Why my objectPool doesnt hide objects for client, only for server, rewatched the moment many times, and dont know, why i have this problem
ОтветитьHow do you handle host migration, or is it possible in netcode for gameobjects without lobby or relay?
ОтветитьJust starting to tackle the multiplayer functionality in my game, and this is the first video I came across. Got some snacks to munch on while I binge the rest of your content. Looking forward to becoming a patron in the future, love your work.
ОтветитьFor those that don't want to type out the ClientRpcParams delareation every time, you can paste the following helper functions into your game manager:
public static ClientRpcParams NewClientRpcSendParams(ulong recipientId)
{
return new()
{
Send = new ClientRpcSendParams
{
TargetClientIds = new ulong[] {recipientId}
}
};
}
public static ClientRpcParams NewClientRpcSendParams(ulong[] recipientsId)
{
return new()
{
Send = new ClientRpcSendParams
{
TargetClientIds = recipientsId
}
};
}
if you're using the updated Network Object Pool then you need to replace the method here and delete anything to do with nonPooling
public int GetPrefabCount()
{
return m_PooledObjects.Count;
}
Hı,Can i use that for multiplayer card game?
ОтветитьFor people having problem using Pool, she's using version 1.1, you gotta change when following this tutorial. Took me a while to realize. Thanks for the content! Please if you can, show us the version of the libraries u are using, those libraries change versions very fast and sometimes we cannot watch full video because we get stuck due to versions. Just a humble suggestion, anyways, thanks for the content!!! <3
Ответитьthank you
ОтветитьHi, I am having issues when I try to play with a friend. I sent him the build but seems that there are issues due the IP as it is in localhost 7777. Do I need to open the ports? If this is not an option for me, how can I use an external server to run the game? Thank you in advance.
ОтветитьMy tail prefab didn't follow tha head prefab 😢 instead it moving opposite of thr player
Ответить@samyam Food Networked Object has not been hide after the player has been reached
ОтветитьIn the authoritative movement section, I don't understand why you don't use the MovePlayerClient function and the player can still move. In my project I'm following yours, if I do the same as you, only the player on the host can move smoothly and the player on the client can move uncontrollably.
Ответитьdon't you use the MovePlayerClient function?
ОтветитьAmazing video.
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 SamYam, I love your video , and I have always been curious as to how coders like dani and yourself manage to learn all of these networking concepts. For me personally, when I open any documentation, my mind just explodes, so i guess do you just push through and read all of the documentation or do you utilize any other sources? oh and what about how you learnt the concept of client-side prediction?
Ответитьis it better than photon?
ОтветитьI cannot belive I just happened to stumble across this hidden gem of a video! Great job!!!
Ответитьresponse.Reason in the ConnectionApprovalHandler.cs is not valid.
ОтветитьPlease consider updating your tutorials so we can still follow along. The NetworkObjectPool.cs is nothing like it is in this video. Different variable names and different functions, the dequeue for example, doesn't even exist.
Ответитьit's working for unity Android 2D ?
ОтветитьCan i not run this on VS for my scripts ?
ОтветитьOnly 48 minutes of this great video and I have learned so much more than in any other course. Thank you so much for this. Guess I'll have to throw around more praise at the end of the video. But if the quality holds up, it's more than deserved 👍
ОтветитьI cant get my prefab to go into the Networks prefabs lists. anyone have any help they can offer to help me resolves this, please?
ОтветитьI don't know how many tiems I've come to this tutorial in the last 3-4 months while trying to learn netcode for gameobjects. I'm so grateful for your content @samyam!
For everyone else, like and subscribe!
If you are working with NGO in Feb 2024, update to version 1.8.0, lots of quality of life improvements. Specially regarding how they handle RPCs, check the docs!
Great Tutorial with a lot of personal tips on the side :) Very nice...
* I do wonder though if somehow i missed something or this just wasn't really implemented yet :
when a player gets eaten player & tails are gone as expected in that client. On the other clients none of these are destroyed ! Same on the server. There is just dead bodies all over ?!?:)
* & since the tails were collapsing over each other when the head stops, i changed the tail update method,
private void Update() {
deltaPos = followTransform.position - transform.position;
deltaPos.z = 0f;
if (deltaPos.magnitude < distance) return;
transform.position += deltaPos * Time.deltaTime * moveStep;
transform.up = deltaPos.normalized; // Added 'legs' to each tail-segment needed this transform .up
}
One of the best Unity Multiplayer tutorials ive seen, gives almost all Basics you need for a Unity Multiplayer Game
ОтветитьBest Explanation for networking ❤
Ответитьcool video)
Ответитьcool video)
ОтветитьWow nice
your voice so sweat ❤️ best of luck✨
thats cute
Ответитьive come across this and with netcode 1.7.x at least it seems by default it only updates the machine its on not both.. the extract check of isowner isnt necesary.. could get confusing.
Also, the objectpool has a built in countactive to get used, and the networkobjectpool no longer seems to have an initialize/clearpool etc code, and will spawn the initial 30, but then moan after that any spawns "Object is already spawned" even when all the objects have been released and are unused. So annoying to need to make an objectpool when unity provides one and its bust. I had to add a try loop round because even when all objects in the pool are avaiable it will occasionally error which is lunacy
So, I ran into a lot of problems, so i even bought your code in case id been a sausage finger, and your code does the same.
a) if you run as a server only, it never spawns food because it needed a client connection and so the spawner exits because clients are 0
b ) if you run round and eat a lot of food, and out of 50 only expect to have 10 on screen, often a food will be moved, rather than grab a free one of the 40 - the object pool seems faulty
c) often even if you host only, no clients, it will try and despawn something already despanwed and throw errors
I really enjoyed the video but now am a little confused, because the pool seems fundementally flawed
great
ОтветитьI don't understand why there is a seperate script lying around in the documentation (ClientNetworkTransform) - instead of including it as a boolean flag in the NetworkTransform or whatever? I am totally confused by this
ОтветитьThis was extremely interesting, thank you. I've put it on my "saved" list for future re-watching.
Ответитьthere will be NetCode update :D
ОтветитьSo fell in love with your magic voice))
Ответить