Can't believe I've never thought to automate the creation of the same folder structure I create EVERY time. HELLO! Haha. Thank you. I think I'll be learning a lot from you!
Thanks for sharing. Really great to see game-wide design patterns from an experienced hand.. I'm gonna steal the setup script and input scriptable object. :)
Quick note for those who may not use git: you may need to restart PC after installing even if git is running on your machine. According to the unity doc you only have to close out and restart the project and unity hub. that didn't work. i confirmed version and service before starting back up unity but it still didn't allow me to install from git. had to reboot the machine.
There is no 'end' per se, each series lasts as long as subscriber interest stays high. If you need help with a specific game mechanic however, let me know and perhaps it can be the subject of a future video!
A 3D platformer series is nice, but what about the rail shooter? Is it finished? I want to add more to mine but I'm unsure of what to prioritize. What would you have added?
Unfortunately for the Rail Shooter, not too many people watched the last video in that series. While all the core mechanics are done, I can think of 2 things that you could add to your own version: obstacles/pickups (things to collide with) and a UI/HUD. These topics were also covered in the Shoot 'Em Up game as well, which would be very similar.
I'm curious what sort of input are you using? What I keep hearing doesn't sound like a keyboard :D I appreciate the tutorials, I'm picking up a very professional vibe compared to a lot of other creators.
It's just a mechanical keyboard. In later videos you won't hear it at all because I started using Krisp AI for noise cancellation. Thanks for watching!
I’ve got another question, my char is not moving and I have no idea why because I’m pretty sure he should^^ This might gonna be a long comment: At this point we mainly use the Direction expression bodied Property (in the InputReader class) to get the X and Y values when we move the character via WASD. This input gets then processed in the moveDirection local variable in the HandleMovement Method in the PlayerController. This is already a problem in my case, since no matter what I press while logging I always get (0,0,0) in return. Which should not be the case because in other projects the exact same way of getting the input does work fine. If I am correct the UnityAction Move while being invoked from the OnMove, is doing basically nothing right not since nothing is subscribed to Move. OnMove on the other hand is subscribed to the Callbacks of the Action Map and therefor should at least fire when we hit WASD (which it doesn’t in my case) and if I log it I should receive a comment in the Console. Which I currently don’t get as well. Is my thinking correct or am I wrong here? I really have no idea anymore why it does not work If you somehow manage to find some time and you want to look into this, here is a Google Drive Link to the project: drive.google.com/file/d/1_b-lVptEG_ygqWFFNr4nv6rBJkgpjk4f/view?usp=sharing Have a good rest of the weekend :) Edit: Okay this is super weird. I just went and put a Movement Property and a PlayerInputActions instance into the PlayerController and that worked. Then I noticed I was still logging the Movement from the InputReader class and that worked too, so I removed everything I implemented before and without changing anything, now everything is working fine. I can't believe it man, this is satisfying and unsatisfying at the same time because I still have no idea what was causing the error... Well at least I can progress now :D
Normally I do not have time to download and debug projects. However, I did download yours and opened it on my PC using Unity 6.000.0.1f1 - and the character moves around fine without having changed anything. I can only suggest a few things. 1) Do a complete Reload of your project by going to the top menu and selecting Assets > Reimport All. This will reimport all packages and assets in your project as if they are new. 2) Start debugging. Break it down bit by bit starting with the Player Input system until you find the source of the issue. 3) Eliminate the possibility that your hardware is the problem.
Hello @git-amend, do you mind to explain why did you differentiate the multiplier between deltaTime/fixedDeltaTime depends on whether the device is mouse or not? I apologize if this concept had been explained in your previous videos or if I missed it in this video itself. Thank you very much.
That's a very good question. In short, Time.deltaTime is a frame rate dependent value and subject to change. However, mouse delta values are already based on physical movement and are not inherently tied to framerate, so it's better to multiply by a fixed value - either fixedDeltaTime or some other constant value.
@@git-amend Sorry I wrote the comment under the wrong video, it was supposed to be under "Anatomy of an Advanced Player Controller". Problem solved the grounded state and all others were in the "States" file, my bad!
Hey, I started the series since I really liked the State Machine video. I've run into a problem tho, Since the last update of the Cinemachine the FreeLook Camera class is deprecated. At least that's what it says on the tooltip. You get told to use the CinemachineCamera instead. This however makes it impossible to select either the X or Y m_InputAxisValue which are solely members of the CinemachineFreeLook class. So the question is should I just use the CameraFreeLook or do you know a way to make it work with the CinemachineCamera class? (This is regarding the Camera Manager class at 19:51). PS: Oh and I am using the new Unity 6 preview version which could be a problem too I guess (but I think it should be fine, since the Cinemachine is a standalone package, right?),
That's a very interesting question - actually I have on my TODO list for today is to walk through the new Cinemachine 3.1.0 Samples and find out what's changed and improved. I'll get back to you on this.
@@git-amend It seems that to manually change values with the new version of cinemachine you have to get the CinemachineInputAxisController component which references the axis in an array. Unfortunately the InputValue of each axis appears to be the only value that you can't simply write to. Example syntax is CinemachineInputAxisController.Controllers[0].InputValue = cameraMovement.x * multipliers However, this doesn't work and I'm at a loss as to why. Controllers[0].Enabled = false works though so I may have to just switch the axis on and off when we enable/disable mouse look. Did you have any other insights when you looked into the new version? Fantastic videos by the way, thank you very much.
@@isaacj.p.7657 I don't have any great insights into that in particular, but I would suggest adding a layer of abstraction if you need to write to that axis array.
Hey! Great video once again. For some reason my ScriptableObject InputReaders OnEnable method doesnt get called and thus I have no input. I does get called when the scripts recompile however. Any idea?
One thing to keep in mind with instances of ScriptableObjects is that Unity does call OnEnable on ScriptableObjects after scripts are recompiled because it reloads the assets, which triggers the method. However, the method should also be called when you run the game. Make sure that is happening. The next thing to check is that your PlayerController is actually enabling the input actions by calling the InputReader.EnablePlayerActions() method from Start.
Thank you a lot for this videos, they've helped me a lot. Anyways i wanted to use the Rebind system from InputSystem, how could I implement this without breaking up the InputReader script? I know I need to replace the HeroInputActions inputActions; for PlayerInput inputActions; Since the Rebind system uses the Player Input (you bind the HeroInputActions into it) but then everything else stops working. The only change that I manage to make it work is public Vector3 Direction => inputActions.Player.Move.ReadValue(); for public Vector3 Direction => playerInput.actions["Move"].ReadValue(); but for the rest of the events I can't manage to make them work 😥 if anyone could help it would be amazing. Thanks a lot and sorry if it is something easy to solve, I've been looking how to do this for days and I'm stucked 😅
I think this is a question you'll potentially get more help on Discord with than in the comments - there's a link in the 'About' section of the channel.
Trying this awesome tutorial but getting (CS0618: Class 'Unity.Cinemachine.CinemachineFreeLook' is obsolete: 'This is deprecated. Use Create -> Cinemachine -> FreeLook camera, or create a CinemachineCamera with appropriate components') Free Look V Cam field does not accept the Cinemachine freelook camera. Any fix or suggestions? Downgrade Cinemachine version? Satanic rituals?
This is an older video that uses Cinemachine: 2.9.7 If you want to get familiar with the new Cinemachine 3.1 and use that instead watch this: th-cam.com/video/4xd37R1spKw/w-d-xo.html
i am a complete begginner in Unity and i am using all the default stuff, what is the tool that opens when you enter a script? mine is VS Code but i dont think i can follow the tutorial using it.
You can use VS Code, there's nothing special about my editor as it relates to the video. But for what it's worth, I'm using JetBrains Rider. At the moment you can get a free copy of it in the early access program if you want here: www.jetbrains.com/rider/nextversion/
@@git-amend thank you, i asked because you were doing stuff i had no idea how to do when creating the setup to create folder automatically, and i thought it was the editor
@@eugeniogenuinomota681 This channel is definitely geared towards devs who are ready to move beyond the beginner stage, so you may face some challenges as a total beginner. Not that you can't do it, but you may have to check the video comments for obstacles other beginners have faced, and of course the source code is also available in the description.
@@git-amend thank you, i was actually really excited for the tutorial for that reason, you seen to be very experienced and i am really wanted to learn what you were doing, its for a school project. Unfortunately, i dont have a lot of time for searching and stuff, so really i just wanted to make a game as quick as possible lol, just to show to my teacher. i tried downloading the source code, but since i dont fully understand it its kinda hard to work with, like adding certain components and stuff
My character walking animation isnt working and im getting an error saying "Parameter 'Hash -823668238' does not exits. UnityEngine.Animator:SetFloat (int,single)". PLS HELP! I CANT GO ON LIKE THIS!!
The error you're encountering typically means that Unity's Animator is trying to set a parameter using a hash value for a parameter that doesn't exist in the Animator Controller. The Hash -823668238 refers to a parameter that was either: a) Not created in the Animator. b) Removed or renamed after the code was written. c) You have a typo in the name of the parameter In the Animator Controller, go to the Parameters tab and make sure the parameter that the code is trying to set exists. The parameter might have been deleted or renamed. Then verify that the parameter name used in your code matches exactly with the name in the Animator Controller.
@@git-amend I didn't really under stand what you said, but i realized i wasn't making it in Universal 3D so i made a new project in URP and now it works!
My character won't turn with the camera or when I hit 'A' and 'D'. Any idea why this could be happening? I've reviewed the video and I think that I've followed the tutorial exactly. Edit: After switching to a rigidbody (part 2 of this series) the character now turns. No idea why.
Hi everyone! There's a small bonus in the first few minutes! Click the LIKE button if you find it useful!
hidden gem channel. been doing Unity for 6 years now and the first 2min 30seconds are enough to show this guy aint messing around
Hey! Thanks for the kind words!
Can't believe I've never thought to automate the creation of the same folder structure I create EVERY time. HELLO! Haha. Thank you. I think I'll be learning a lot from you!
Haha, sometimes the simplest solutions are the ones we overlook! Nice to have you here!
Just, wow! My jaw dropped when you created the Setup tool in the beginning! Please continue this series, it's amazing!
Haha! The setup tool gets more powerful in future episodes! Glad you like it.
@@git-amendSeriously dope 👍 Thanks for sharing your experience and knowledge with us ✌️✨
@@orpheuscreativeco9236 Thanks!
this is pure gold!!! thank you!
You're so welcome!
Thanks for sharing. Really great to see game-wide design patterns from an experienced hand..
I'm gonna steal the setup script and input scriptable object. :)
Glad it was helpful!
🎉 absolutely amazed at this channel! Have yet to find something similar!! Keep it up. :D
Wow thanks!
Love this series so far... looking forward to the next one. I learned alot of editor and design concepts in a very short time :)
Glad you like them! Cheers!
Perfection, hyped for the series!
That setup script thing was awesome
Glad you liked that one!
the C# I know is all in-game related so it was refreshing to see something like that@@git-amend
Good job, earned my sub.
Awesome, thank you!
Awesome tutorial!
Glad you liked it!
Quick note for those who may not use git: you may need to restart PC after installing even if git is running on your machine. According to the unity doc you only have to close out and restart the project and unity hub. that didn't work. i confirmed version and service before starting back up unity but it still didn't allow me to install from git. had to reboot the machine.
awesome tutorial!
Thank you! Cheers!
Please do complete this series I am loving it and need help till end
There is no 'end' per se, each series lasts as long as subscriber interest stays high. If you need help with a specific game mechanic however, let me know and perhaps it can be the subject of a future video!
A 3D platformer series is nice, but what about the rail shooter? Is it finished? I want to add more to mine but I'm unsure of what to prioritize. What would you have added?
Unfortunately for the Rail Shooter, not too many people watched the last video in that series.
While all the core mechanics are done, I can think of 2 things that you could add to your own version: obstacles/pickups (things to collide with) and a UI/HUD. These topics were also covered in the Shoot 'Em Up game as well, which would be very similar.
I'm curious what sort of input are you using? What I keep hearing doesn't sound like a keyboard :D I appreciate the tutorials, I'm picking up a very professional vibe compared to a lot of other creators.
It's just a mechanical keyboard. In later videos you won't hear it at all because I started using Krisp AI for noise cancellation. Thanks for watching!
I’ve got another question, my char is not moving and I have no idea why because I’m pretty sure he should^^
This might gonna be a long comment:
At this point we mainly use the Direction expression bodied Property (in the InputReader class) to get the X and Y values when we move the character via WASD. This input gets then processed in the moveDirection local variable in the HandleMovement Method in the PlayerController. This is already a problem in my case, since no matter what I press while logging I always get (0,0,0) in return. Which should not be the case because in other projects the exact same way of getting the input does work fine.
If I am correct the UnityAction Move while being invoked from the OnMove, is doing basically nothing right not since nothing is subscribed to Move. OnMove on the other hand is subscribed to the Callbacks of the Action Map and therefor should at least fire when we hit WASD (which it doesn’t in my case) and if I log it I should receive a comment in the Console. Which I currently don’t get as well. Is my thinking correct or am I wrong here? I really have no idea anymore why it does not work
If you somehow manage to find some time and you want to look into this, here is a Google Drive Link to the project: drive.google.com/file/d/1_b-lVptEG_ygqWFFNr4nv6rBJkgpjk4f/view?usp=sharing
Have a good rest of the weekend :)
Edit: Okay this is super weird. I just went and put a Movement Property and a PlayerInputActions instance into the PlayerController and that worked. Then I noticed I was still logging the Movement from the InputReader class and that worked too, so I removed everything I implemented before and without changing anything, now everything is working fine. I can't believe it man, this is satisfying and unsatisfying at the same time because I still have no idea what was causing the error... Well at least I can progress now :D
Normally I do not have time to download and debug projects. However, I did download yours and opened it on my PC using Unity 6.000.0.1f1 - and the character moves around fine without having changed anything.
I can only suggest a few things. 1) Do a complete Reload of your project by going to the top menu and selecting Assets > Reimport All. This will reimport all packages and assets in your project as if they are new. 2) Start debugging. Break it down bit by bit starting with the Player Input system until you find the source of the issue. 3) Eliminate the possibility that your hardware is the problem.
@@git-amend Wow thanks for the effort!
Hello @git-amend, do you mind to explain why did you differentiate the multiplier between deltaTime/fixedDeltaTime depends on whether the device is mouse or not?
I apologize if this concept had been explained in your previous videos or if I missed it in this video itself. Thank you very much.
That's a very good question. In short, Time.deltaTime is a frame rate dependent value and subject to change. However, mouse delta values are already based on physical movement and are not inherently tied to framerate, so it's better to multiply by a fixed value - either fixedDeltaTime or some other constant value.
@@git-amend Ahh I'm with you, thank you! Your channel is such a goldmine btw.
you are so awesome
Hey, awesome video again! I have a problem though, I can't find the Grounded state in any of the repositories, could anyone help?
There is no Grounded state. What are you referring to?
@@git-amend Sorry I wrote the comment under the wrong video, it was supposed to be under "Anatomy of an Advanced Player Controller". Problem solved the grounded state and all others were in the "States" file, my bad!
Hey, I started the series since I really liked the State Machine video. I've run into a problem tho, Since the last update of the Cinemachine the FreeLook Camera class is deprecated. At least that's what it says on the tooltip. You get told to use the CinemachineCamera instead. This however makes it impossible to select either the X or Y m_InputAxisValue which are solely members of the CinemachineFreeLook class.
So the question is should I just use the CameraFreeLook or do you know a way to make it work with the CinemachineCamera class? (This is regarding the Camera Manager class at 19:51).
PS: Oh and I am using the new Unity 6 preview version which could be a problem too I guess (but I think it should be fine, since the Cinemachine is a standalone package, right?),
That's a very interesting question - actually I have on my TODO list for today is to walk through the new Cinemachine 3.1.0 Samples and find out what's changed and improved. I'll get back to you on this.
@@git-amend Cool, thank you very much! :D
Check out this page, it basically outlines everything I would advise: docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/FreeLookCameras.html
@@git-amend It seems that to manually change values with the new version of cinemachine you have to get the CinemachineInputAxisController component which references the axis in an array. Unfortunately the InputValue of each axis appears to be the only value that you can't simply write to.
Example syntax is CinemachineInputAxisController.Controllers[0].InputValue = cameraMovement.x * multipliers However, this doesn't work and I'm at a loss as to why.
Controllers[0].Enabled = false works though so I may have to just switch the axis on and off when we enable/disable mouse look.
Did you have any other insights when you looked into the new version?
Fantastic videos by the way, thank you very much.
@@isaacj.p.7657 I don't have any great insights into that in particular, but I would suggest adding a layer of abstraction if you need to write to that axis array.
Hey! Great video once again. For some reason my ScriptableObject InputReaders OnEnable method doesnt get called and thus I have no input. I does get called when the scripts recompile however. Any idea?
One thing to keep in mind with instances of ScriptableObjects is that Unity does call OnEnable on ScriptableObjects after scripts are recompiled because it reloads the assets, which triggers the method.
However, the method should also be called when you run the game. Make sure that is happening.
The next thing to check is that your PlayerController is actually enabling the input actions by calling the InputReader.EnablePlayerActions() method from Start.
Thank you a lot for this videos, they've helped me a lot. Anyways i wanted to use the Rebind system from InputSystem, how could I implement this without breaking up the InputReader script? I know I need to replace the
HeroInputActions inputActions;
for
PlayerInput inputActions;
Since the Rebind system uses the Player Input (you bind the HeroInputActions into it) but then everything else stops working. The only change that I manage to make it work is
public Vector3 Direction => inputActions.Player.Move.ReadValue();
for
public Vector3 Direction => playerInput.actions["Move"].ReadValue();
but for the rest of the events I can't manage to make them work 😥 if anyone could help it would be amazing.
Thanks a lot and sorry if it is something easy to solve, I've been looking how to do this for days and I'm stucked 😅
I think this is a question you'll potentially get more help on Discord with than in the comments - there's a link in the 'About' section of the channel.
@@git-amend Thank you! I'll ask around 😊
In case anyone had the same problem as me, you only need to bind your actions like this!
playerInput.actions["Move"].performed += ctx => OnMove(ctx);
Trying this awesome tutorial but getting (CS0618: Class 'Unity.Cinemachine.CinemachineFreeLook' is obsolete: 'This is deprecated. Use Create -> Cinemachine -> FreeLook camera, or create a CinemachineCamera with appropriate components') Free Look V Cam field does not accept the Cinemachine freelook camera. Any fix or suggestions? Downgrade Cinemachine version? Satanic rituals?
This is an older video that uses Cinemachine: 2.9.7
If you want to get familiar with the new Cinemachine 3.1 and use that instead watch this: th-cam.com/video/4xd37R1spKw/w-d-xo.html
@ I’ll downgrade and use that version, thanks!
i am a complete begginner in Unity and i am using all the default stuff, what is the tool that opens when you enter a script? mine is VS Code but i dont think i can follow the tutorial using it.
You can use VS Code, there's nothing special about my editor as it relates to the video. But for what it's worth, I'm using JetBrains Rider. At the moment you can get a free copy of it in the early access program if you want here: www.jetbrains.com/rider/nextversion/
@@git-amend thank you, i asked because you were doing stuff i had no idea how to do when creating the setup to create folder automatically, and i thought it was the editor
@@eugeniogenuinomota681 This channel is definitely geared towards devs who are ready to move beyond the beginner stage, so you may face some challenges as a total beginner. Not that you can't do it, but you may have to check the video comments for obstacles other beginners have faced, and of course the source code is also available in the description.
@@git-amend thank you, i was actually really excited for the tutorial for that reason, you seen to be very experienced and i am really wanted to learn what you were doing, its for a school project.
Unfortunately, i dont have a lot of time for searching and stuff, so really i just wanted to make a game as quick as possible lol, just to show to my teacher.
i tried downloading the source code, but since i dont fully understand it its kinda hard to work with, like adding certain components and stuff
How do you do when doing an animal controller
Actually I use Malbers Animal Controller from the Asset Store for that, it's excellent.
What IDE do you use?
JetBrains Rider
do you have a discord server?
Not an official one yet, something to consider!
My character walking animation isnt working and im getting an error saying "Parameter 'Hash -823668238' does not exits. UnityEngine.Animator:SetFloat (int,single)". PLS HELP! I CANT GO ON LIKE THIS!!
The error you're encountering typically means that Unity's Animator is trying to set a parameter using a hash value for a parameter that doesn't exist in the Animator Controller. The Hash -823668238 refers to a parameter that was either:
a) Not created in the Animator.
b) Removed or renamed after the code was written.
c) You have a typo in the name of the parameter
In the Animator Controller, go to the Parameters tab and make sure the parameter that the code is trying to set exists. The parameter might have been deleted or renamed. Then verify that the parameter name used in your code matches exactly with the name in the Animator Controller.
@@git-amend I didn't really under stand what you said, but i realized i wasn't making it in Universal 3D so i made a new project in URP and now it works!
My character won't turn with the camera or when I hit 'A' and 'D'. Any idea why this could be happening? I've reviewed the video and I think that I've followed the tutorial exactly.
Edit: After switching to a rigidbody (part 2 of this series) the character now turns. No idea why.
you are too high level man yu teach the dopest shit but please start from intermediate
This is intermediate. Go watch the Event Bus video and then come back here and this will seem easy!