Custom 3D Sprite Setter in UNITY
1:08
Пікірлер
@soytet365
@soytet365 4 ай бұрын
I can't import Unity.Netcode; I think maybe thirdpersoncontroller script difference located file from Netcode packages anyone met this issue?
@johnoyaxi3363
@johnoyaxi3363 2 ай бұрын
same,dont kown how to fix it
@JezzGT
@JezzGT 17 күн бұрын
If you move the file from its location within the imported asset to root asset folder it should work fine. You will also need to fix the compiler errors relating to editor scripts, if you don't want or need the editor buttons just delete the script.
@ImTheMrFoxman
@ImTheMrFoxman 5 ай бұрын
This video was a godsend! So many tutorials just go over a single camera view. This was amazing, espcially since I'm building off of the unity standard assests. Thank you!
@GamingWithMitOfficial
@GamingWithMitOfficial 6 ай бұрын
This is Tutorial Is not Working Please Solve My Issue
@GamingWithMitOfficial
@GamingWithMitOfficial 6 ай бұрын
NullReferenceException: Object reference not set to an instance of an object Unity.Netcode.NetworkConnectionManager.HandleConnectionApproval (System.UInt64 ownerClientId, Unity.Netcode.NetworkManager+ConnectionApprovalResponse response) (at C:/Users/Mitu/Downloads/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects/Runtime/Connection/NetworkConnectionManager.cs:723) Unity.Netcode.NetworkManager.HostServerInitialize () (at C:/Users/Mitu/Downloads/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs:1080) Unity.Netcode.NetworkManager.StartHost () (at C:/Users/Mitu/Downloads/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs:1035) UnityEngine.Debug:LogException(Exception) Unity.Netcode.NetworkManager:StartHost() (at C:/Users/Mitu/Downloads/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects-develop/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs:1040) <>c:<Awake>b__3_1() (at Assets/NetworkUI.cs:17) UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/[email protected]/Runtime/UGUI/EventSystem/EventSystem.cs:530) Show me Error
@GamingWithMitOfficial
@GamingWithMitOfficial 6 ай бұрын
You like this same add to the server (Photon), As I am at school and my friend is at home, we can play together For example Pubg, ValoRant, Gta Online
@Tajdang
@Tajdang 7 ай бұрын
Thank you so much. u r the best!!!
@bryand1470
@bryand1470 8 ай бұрын
*PromoSM* 🤭
@DoubtfulSongs
@DoubtfulSongs 10 ай бұрын
CODE: using UnityEngine; using Unity.Netcode; using Cinemachine; using Unity.Netcode.Components; #if ENABLE_INPUT_SYSTEM using UnityEngine.InputSystem; #endif
@FarSam25
@FarSam25 10 ай бұрын
thank you so much
@NastyCat
@NastyCat 11 ай бұрын
Thank you very much for your tutorial, it saved my homework project! :) Also great job at figuring out Networking with these exact Starter Asssets, my nerves wouldn't have lasted that long...
@SinhtUpthereal
@SinhtUpthereal 11 ай бұрын
Hey Thanks for the great tutorial!! but i have an issue i can host an instance but i can not move or turn my camera these are my logs: Parameter 'Hash 0' does not exist. UnityEngine.Animator:SetBool (int,bool) StarterAssets.ThirdPersonController:JumpAndGravity () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:312) StarterAssets.ThirdPersonController:Update () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:176) Parameter 'Hash 0' does not exist. UnityEngine.Animator:SetBool (int,bool) StarterAssets.ThirdPersonController:JumpAndGravity () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:312) StarterAssets.ThirdPersonController:Update () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:176) NullReferenceException: Object reference not set to an instance of an object StarterAssets.ThirdPersonController.JumpAndGravity () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:322) StarterAssets.ThirdPersonController.Update () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:176) NullReferenceException: Object reference not set to an instance of an object. StarterAssets.ThirdPersonController.CameraRotation () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:215) StarterAssets.ThirdPersonController.LateUpdate () (at Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs:185)
@SinhtUpthereal
@SinhtUpthereal 11 ай бұрын
never mind tryed again with a fresh project and it worked, thx !
@gorkem9324
@gorkem9324 11 ай бұрын
Hello, I have everything working except when the client jumps I got this error on the host side and client kinda stuck in the air. ----- [Netcode] [DestinationState To Transition Info] Layer (0) does not exist! UnityEngine.Debug:LogError (object) Unity.Netcode.NetworkLog:LogError (string) (at Library/PackageCache/[email protected]/Runtime/Logging/NetworkLog.cs:34) Unity.Netcode.Components.NetworkAnimator:UpdateAnimationState (Unity.Netcode.Components.NetworkAnimator/AnimationState) (at Library/PackageCache/[email protected]/Components/NetworkAnimator.cs:1181) Unity.Netcode.Components.NetworkAnimator:SendAnimStateServerRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ServerRpcParams) (at Library/PackageCache/[email protected]/Components/NetworkAnimator.cs:1261) Unity.Netcode.Components.NetworkAnimator:__rpc_handler_4140764492 (Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.__RpcParams) Unity.Netcode.RpcMessageHelpers:Handle (Unity.Netcode.NetworkContext&,Unity.Netcode.RpcMetadata&,Unity.Netcode.FastBufferReader&,Unity.Netcode.__RpcParams&) (at Library/PackageCache/[email protected]/Runtime/Messaging/Messages/RpcMessages.cs:70) Unity.Netcode.ServerRpcMessage:Handle (Unity.Netcode.NetworkContext&) (at Library/PackageCache/[email protected]/Runtime/Messaging/Messages/RpcMessages.cs:117) Unity.Netcode.MessagingSystem:ReceiveMessage<Unity.Netcode.ServerRpcMessage> (Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&,Unity.Netcode.MessagingSystem) (at Library/PackageCache/[email protected]/Runtime/Messaging/MessagingSystem.cs:541) Unity.Netcode.MessagingSystem:HandleMessage (Unity.Netcode.MessageHeader&,Unity.Netcode.FastBufferReader,ulong,single,int) (at Library/PackageCache/[email protected]/Runtime/Messaging/MessagingSystem.cs:414) Unity.Netcode.MessagingSystem:ProcessIncomingMessageQueue () (at Library/PackageCache/[email protected]/Runtime/Messaging/MessagingSystem.cs:434) Unity.Netcode.NetworkManager:OnNetworkEarlyUpdate () (at Library/PackageCache/[email protected]/Runtime/Core/NetworkManager.cs:1443) Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/[email protected]/Runtime/Core/NetworkManager.cs:1375) Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:185) Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:<CreateLoopSystem>b__0_0 () (at Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:208)
@tarchinstudios
@tarchinstudios Жыл бұрын
Everything is perfect on the host server, but the clients cannot move. Why?
@viktorportman2736
@viktorportman2736 Жыл бұрын
If you have multiple control schemes in your input system then the host will take the first control scheme then the client will take the next to fix the problem just remove all control schemes but keyboard, happy developing!
@nilsmuller-cleve6769
@nilsmuller-cleve6769 Жыл бұрын
I could not figure out how to get the controls properly working, thanks a lot for this!
@YONYSVERA
@YONYSVERA Жыл бұрын
I was able to do everything and I have it functional, but the only detail that I find in my project is that in one window the animations of all the characters are perfectly visible, but in the others the other player is displayed without the animation of walking . Who could help me..
@Mjoao2006
@Mjoao2006 Жыл бұрын
I need help I did everything right but when executing and clicking on the host button nothing happens and if you try it with the skin in the scenario it doesn't do anything it doesn't move the camera doesn't turn anything if you could help me thanks
@moisebattello1110
@moisebattello1110 Жыл бұрын
thank bro you are smart
@thepursuer7872
@thepursuer7872 Жыл бұрын
Following the tutorial i cant move the character, or camera, jump or sprint using the screen UI, how can i fix? i wanna build for android
@Roozbehchief98
@Roozbehchief98 Жыл бұрын
I have an issue with adding the animator to my Client Network Animator script. It is only showing available animators in the scene, and the animator is not available in the scene(is removed from the scene). Therefore when I run the project I get the error "The variable m_Animator of ClientAnimatorTransform has not been assigned.". I added a line so that it picks the animator from the gameobject after it instantiates, but the error still happens for a few frames and I cannot get a build successfully. Any thoughts?
@gabrielcampos295
@gabrielcampos295 Жыл бұрын
Exactly what i needed good job!
@madamutzsar
@madamutzsar Жыл бұрын
This tutorial worked great, but I'm having a weird problem. If the character is in the scene before it starts, the camera works just fine. However, if I spawn the character into the scene, the character does not go in the direction the camera is facing and movement becomes unpredictable. Any idea what the problem could be? 'cause I'm stumped ;o;
@madamutzsar
@madamutzsar Жыл бұрын
Nvm, I solved the mystery. It was finding the wrong main camera x)
@leonhardfloh5902
@leonhardfloh5902 Жыл бұрын
Hi Great Video It Helped a lot!! I still have Errors with the audio: Following 2 Errormessages get displayed: NullReferenceException: Object reference not set to an instance of an object StarterAssets.ThirdPersonController.OnFootstep (UnityEngine.AnimationEvent animationEvent) (at Assets/Scripts/Player/ThirdPersonController.cs:408) and NullReferenceException: Object reference not set to an instance of an object StarterAssets.ThirdPersonController.OnLand (UnityEngine.AnimationEvent animationEvent) (at Assets/Scripts/Player/ThirdPersonController.cs:417) Can someone please help me to fix those? Thanks in advance
@leonhardfloh5902
@leonhardfloh5902 Жыл бұрын
Fixed it: If you have this problem take out followin functions from the startmehtode and place them in the OnNetworkSpawnMethod ( above owner varification) _hasAnimator = TryGetComponent(out _animator); _controller = GetComponent<CharacterController>(); _input = GetComponent<StarterAssetsInputs>();
@lewis931
@lewis931 Жыл бұрын
This video is amazing! Quick and easy to understand so thank you.
@perspectives2202
@perspectives2202 Жыл бұрын
Were you be able to succeed it with third person controller for both host and client?
@lewis931
@lewis931 Жыл бұрын
@@perspectives2202 Yeah
@perspectives2202
@perspectives2202 Жыл бұрын
It says, detected the host is sending itself animation updates please report this isssue. Also it can not be controlled by other player as soon as I connect with a client, host can not play the game
@TheCloucs
@TheCloucs Жыл бұрын
Hey, first of all I would like to thank you for the video. Helped me to get started with a multiplayer prototype for my game. There is one big issue I'm still facing. The Unity Input System always assigns the Xbox Controller control scheme to the 2nd player, even over the network. Any tips with that? Did somebody else figure out how to disable that?
@user-ch6ww4qy9h
@user-ch6ww4qy9h Жыл бұрын
Having the same issue. I tried disabling input system but when i try with 2 different characters it doesnt work.
@qwertz3813
@qwertz3813 Жыл бұрын
you can set default control scheme in input component on player to use keyboard + mouse by default
@aswinsriram4778
@aswinsriram4778 Жыл бұрын
Thanks bro
@SergKoshelev
@SergKoshelev Жыл бұрын
how can i integrate unity lobby in this setup?
@zbeb118
@zbeb118 Жыл бұрын
How would I be able to change the rotation of the prefab? I changed the prefab's position and rotation and assigned the prefab it in the Network Manager script, when I click host, the prefab spawns at the correct position, but not the rotation, any ideas?
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
There's a small but very important bug in the code a viewer pointed out (thanks Stefan RIZEA). At 5:20, instead of using _cinemachineVirtualCamera.Follow = transform, use _cinemachineVirtualCamera.Follow = transform.GetChild(0) or transfom.Find("PlayerCameraRoot") or even cache the PlayerCameraRoot's transform and set cinemachineVirtualCamera.Follow equals to this variable! Then, you can go to the CinemachineVirtualCamera component in PlayerFollowCamera, go to Body > Rig > Shoulder Offset and set Y to 0.
@nilsmuller-cleve6769
@nilsmuller-cleve6769 Жыл бұрын
The camera root object is already assigned in the variable CinemachineCameraTarget.
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
Do you know how we could make the mouse work aswell? With this solution, we can only use WASD to look around.
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
I'm also having the same problems @what8586 and @shino3257 are having. The camera moves very close to the player when walking up the stairs and the players spins when trying to walk backwards.
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
I managed to fix it. I changed this: _cinemachineVirtualCamera.Follow = transform; To this: _cinemachineVirtualCamera.Follow = transform.GetChild(0).transform; It fixed all the problems. You don't need the Y offset anymore.
@closet_games
@closet_games Жыл бұрын
@@StefanRIZEA_ Even after applying your suggested fix, the character still spins when trying to walk backwards. I debugged and checked which Child it fetched by your command, and it is Player CameraRoot indeed. Do You have any other ideas on how I could fix it?
@closet_games
@closet_games Жыл бұрын
I noticed that when holding "S" to move back, the character starts spinning, are You having the same issue?
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
Hello! Check out my comment. I managed to fix it.
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
The fix is in the pinned comment.
@closet_games
@closet_games Жыл бұрын
Thanks, appreciated 😊
@JimboS1ice999
@JimboS1ice999 Жыл бұрын
amazing tutorial anyway you can add a physics simulation to this project? where the simulated physics on both clients are sent to the server and whicherver has more potential "velocity" or "force" etc would be the result displayed and sent back to both clients in a dedicated server setting?
@maxit0x
@maxit0x Жыл бұрын
Bro good one! Works 100% Thanks for share.
@mabialakienda
@mabialakienda Жыл бұрын
Very nice content, so Im getting error Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs(109,17): error CS0246: The type or namespace name 'CinemachineVirtualCamera' could not be found (are you missing a using directive or an assembly reference?)
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
Have you installed Cinemachine?
@mtarikan
@mtarikan Жыл бұрын
@@exhit-gamedeveloper9971 Assets\Scripts\ThirdPersonController.cs(161,30): error CS0115: 'ThirdPersonController.OnNetworkSpam()': no suitable method found to override Assets\Scripts\ThirdPersonController.cs(111,17): error CS0246: The type or namespace name 'CinemachineVirtualCamera' could not be found (are you missing a using directive or an assembly reference?) Cinemachine is installed and I'm getting the same error.
@mtarikan
@mtarikan Жыл бұрын
I found a solution. Adding "using Cinemachine" at the start of the script to libraries solved my second problem. Also getting Multiplayer Samples Utilities from git link solved my first problem.
@litember1104
@litember1104 Жыл бұрын
@@mtarikan Bro can you please tell me how you solved onnetworkspawn() error?
@fabianobersovszky6987
@fabianobersovszky6987 Жыл бұрын
3:22 Why is ClientNetworkAnimator not good for competitive games?
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
Correct me if i'm wrong but I belive the server always trusts the client to change it's own position.
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
In competitive games, you can't trust the client to be responsible for its own changes without parsing on the server side. It enables cheating.
@fabianobersovszky6987
@fabianobersovszky6987 Жыл бұрын
great tutorial!
@what8586
@what8586 Жыл бұрын
great tutorial the camera was glitchy when walking up stairs and how would i get the joystick and buttons work
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
Hello! Check out my comment. I managed to fix it.
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
Sorry I'm late! Been super busy :( The fix is in the pinned comment.
@salmaanmoosa3103
@salmaanmoosa3103 Жыл бұрын
Awesome tutorial! Would be awesome to see more netcode for game object tutorials. Like server authoritative networking?
@MASTONGAMES
@MASTONGAMES Жыл бұрын
how to make a shooting game with netCode, here's the question...
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
Brackeys has a great playlist with tutorials. They are using the old uNet architecture, but the steps should be the same, 90% of the time.
@perspectives2202
@perspectives2202 Жыл бұрын
@@StefanRIZEA_ Can you share the playlist please
@StefanRIZEA_
@StefanRIZEA_ Жыл бұрын
@@perspectives2202 kzfaq.info/get/bejne/i7FlatSV1sXQkZ8.html
@perspectives2202
@perspectives2202 Жыл бұрын
@@StefanRIZEA_ thanks for your quick reply, appreciate it!
@haraldgundersen7303
@haraldgundersen7303 Жыл бұрын
Very nice content. Could do without background music but content very useful...
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
Music helped settle the mood for me. But I'll keep your comment in mind. Thank you 🙏
@exhit-gamedeveloper9971
@exhit-gamedeveloper9971 Жыл бұрын
** IF YOU WANT YOUR GAME IN WINDOW MODE ** Go to EDIT - PROJECT SETTINGS Then, got to PLAYER - RESOLUTION AND PRESENTATION On the Resolution section, Fullscreen Mode, choose Windowed and set the resolution you want
@bobbville
@bobbville 2 жыл бұрын
Cool design! 🍻