holy CRAP!!!! Dude thank you SO much for your support, I don't even know what to say...That's so generous, Nikki and I appreciate it from the bottom of our hearts
With the view counts increasing, and the super generous donor under this video, the future looks bright for your channel (AND studio!). Thank you so much for these videos that are honestly worth putting a price tag on. You guys take care!
I feel like I'll need to watch this like 10 more times before i can even start keeping up xD awesome tutorial though, making it all so clean and look effortless is inspiring
Ok just went through the video once and my mind just blanked out at some point. I need to rewatch this a few more times cause there's just so much info there. And I want to understand this completely. Thanks
Just subscribed off this video alone. Some people may hate the amount of scripts here but I love how compartmentalized this is. So easy to follow, even as someone who has yet to implement a state machine yet. Great background story you guys have as well. Hoping the best for you two!
This really helped out a lot. I was doing the same kind of scripts but i was communicating the scripts together in different order which was making me confused at times. The way you do it was very easy to follow.
This is really helpful and well put together. I loved the super quick and casual interface explanation I've been needing to learn that more in depth and that clicked really well how you explained it. Thank you sir.
The worst thing about these videos is they have to be this long and you kept it as short as possible. All of this doesn't favor the youtube algorithm. Really great video! I won't go into tiny details I think that would make it better. Again, thank you so much for this!
This is so nice, informative constructions not only the state machine itself. And the explanation was spot on. Great learning source for newbie like me.
Really top tutorial I was always curious of the scriptable object approach although never messed around too much with the idea myself. Although I currently working on a update for a game that already been prototyped and has shown enough interest that taking further. I have changed so much that new Enemy AI was needing done was originally going use a plug in but decided that I would be better to reduce the work load, but after thinking I seen your scriptable object approach. That led me back to previous video. Gave thumbs up and sub well deserved and look foward to the scriptable object use for my game as it will allow to do as you say give the exponential behaviours that will work great for my game as it will have procedural generation aswell so this give real variety abilities. So thank you and big ups for your videos
Great tutorial, having a big file with 2000 lines is a hell when something goes bad. Would be awesome going a little deeper playing around with the AnimationTriggerEvent method, or using some good practices for where start animations on states, etc.. (I've seen some of your vids, seems you use professional practices, and that is what newbies like me need)
I'd avoid nesting colliders like this. The interaction with the colliders bubbles up through the other components on the GameObject. Imagine you're writing a top down space shooter and you're implementing this exact FSM and collider arrangement for a "boss" capital ship. Alongside, the two circle colliders you also have other code that detects a player laser hitting a collider that closely maps the boss ship where you want there to be an explosion. As the laser triggers each collider an explosion will be displayed, most of the time well outside the RigidBody model. Much better to avoid the two circle colliders and simply calculate the distance between the "boss" and the player in the EnemyAggroCheck and EnemyStrikingDistanceCheck classes via a Vector2/Vector3.Distance call in the Update method. Otherwise, this is a great intro to FSM and the follow up ScriptableObject FSM tutorial is genius.
0:18 //move... LOL!!! thanks for the tutorial, as a beginner this is hard to understand, I might have to watch the video like 10 times before I totally get it, but who said programming is easy xD
Great Video, I ran into a nullpointer exception in fixed update because it was called before the start method and had to get the rb component within awake function of my enemy class
I'm getting a NullReferenceException when I try to call PhysicsUpdate(). But the error goes away if it's called from Update() instead of FixedUpdate(). Any ideas?
I believe if you left Start and Update methods in Ghost class it somehow overrides Enemy Start and Update with nothing and, therefore, can't find some reference in FixedUpdate.
The amount of information is just awesome 🔥, only if u could slow down the pace a little bit it would be easier to watch than pausing everytime , still thanks for the great information.
Already lost me at 3:20. When I right click there's no option for "quick actions and refactoring". Even if there was, where did all that code come from? I was hoping this could be a standalone video.
that's really help full, thanks for this tutorial! im trying a multi statemachine for different behavior and that solve the problem for different types of interactions. i was now woundering is the quick override an extension or something, i type all the overrides and im getting crazy now
what's about this aproach for time cooldown system?is it worthless? I meant I Like to control a lot my attack possiblity and make desicion for my rpg game. I do not trust so muh in Mult state machine inheritance. but probaly scriptable object can be easier can be little tricky special for save-load game approach.
At first, i really appreciate for making such great video. I want to ask about something. I tought, if we use getter and setter structure for both character properties and animation state machine, wouldn't it be more difficult to understand? I'm not expert of this, but maybe we can use switch - case for state machine, and for the character properties (such as durability or move speed) we can use getter and setter form. What are your thoughts on this? Thank you.
this video is awesome and contains a bunch of information. you clearly know what you want to get done and seem to implement all of it pretty seamlessly. for me however i am just starting and looking to understand state machines better and this video moves pretty quick and contains a lot of information that im getting lost with, i implemented a state pattern from another creator 'iHeartGameDev' but a few of my more knowledgeable friends said perhaps it was a sub-par example/implementation of a state machine, even though it was functional. do you perhaps have another more 'beginner friendly' youtube video or article that you could recommend to me?
Struggling to figure out how to implement this is a way that lets me base state movement stats over to my main player script. Feels like I'd have to implement a lot of interfaces and possibly end up with double code?
Hey! Don't know if you're still answering comments but I had a question about one of the things you showed. I was following the tutorial and noticed that in order for my enemy to properly initialize, the "Ghost" needs to have it's start function removed, even if it was empty before removal. (This took way too much debugging on my part to figure out 🤦♀) If the ghost had a Start function in it at all, the Start function on the Creature script would never run, and thus never initialize a state. Does this mean that we're not able to run code on Start for the Ghost? What would be the best way of handling enemy specific logic that we want to run on Start but don't want to put in the Creature class itself? Thanks so much! Great vid :)
Thanks for tutorial, quite informative but I found a problem. I guess you gonna have memory leaks with such cross reference since Enemy knows about State and State about Enemy. Am I right ?
Shouldn't the reference to player be static, that way you don't need to call it in the constructor and all enemies will share one reference to the player??
What I don't understand is, you create the Chase logic in the ChaseState, but what if different Enemies have different chase logic? I guess I don't expect any respond for such old video, but if anyone sees this you are very welcome to explain to me if this is how it's supposed to be used or if it's just an example.
I think you just create a new class name like SkeletonChaseState : EnemyState for Skeleton enemy or something else and override update in skeletonchasestate.
I am so confused about what happened at 4:22. I'm following along and then all of a sudden in a split second you must have hit some hotkeys and made something called regions? You didn't explain it at all and now I have less lines of code than you but they aren't visible in the video 7:55 generate constructors literally just doesnt show up for me
if you are using vscode than at 4:22 to do the same thing left-click on the interface and press ctr+. and select "implement interface" at 7:55 instead i think it's a vs feature only not implemented in vscode, at least i did not find a thing that does that automatically
Hi! Ive followed the complete tutorial but I cant understand why the movement speed is so slow for me when is chasing the player. Idle speed is the same as the chase one, but chase direction is calculated 10 times small than the other one. Do you know what can it be happening?
one way you could make this video better is to add you using the final product state machine to easily build another enemy using the objects you just created, i know, you'll end up using more prefabs which in essence, are prefabricated lol but it still might help
The AnimationTriggerEvent is kinda slow how do i make it fast? I want to change to another animation after the current animation ends but it doesn't, if turn on animation loop time it takes two to three loops to take effect. How do i fix this?
Would there be any performance implications due to any empty FrameUpdate and PhysicsUpdate calls? I imagine there will be lots of enemies using the Enemy script, some of which will not require FrameUpdate or PhysicsUpdate to be called. Won't this cause some overhead?
Good tutorial. At 10:15 I thought your enemy was varying his speeds and I was so confused. Trying to find a bug in my code or how yours could be doing that. After inspecting closer it looks like actually you just moved the hero which moved the camera and so it just looked like it was going at a different speed. The background is blank so it was hard to tell. Anyway. I found this pretty useful and will continue along. Thanks for the vid.
This is really interesting. I'm not sure I've ever seen a enemy/behavior state coding tutorial like this. It's tricky for novices (like me), but I can see how this could save time in the long run making behaviors that can be switched around. Now, random question, I'm starting to interview indie devs on my channel for a series about developers talking about the games they're making, the tools they use, and games that inspired them. Would you be interested in an interview??
Hi. Do you by chance know how to export an android apk from unity? i keep getting some file when i press build and not the apk, also takes pretty long to build. I get a buildmethod error message at the bottom left part of the unity screen.
When should I use differenct state machines for different systems? I want to handle animation states programmatically in a state machine like this, I also implemented this state machine for my character behaviours. Should I use only one state machine with a variable currentBehaviourState and currentAnimationState or should I split both systems up into 2 different state machines? In my case, the animation states don't correlate always with the behaviour state. How would you guys handle this?
It's always surprising to me that people create scripts in Unity instead of directly in their editor. Creating scripts from your editor means you don't have to clean out the mono behavior bits and allows much higher flexibility.
I did this for his if else if (!enemy.IsWithinStrikingDistance) { _exitTimer += Time.deltaTime; if(_exitTimer > _timeTillExit) { enemy.StateMachine.ChangeState(enemy.ChaseState); } } else { _exitTimer = 0f; }
Great tutorial! If i use imported animations for my 3D game, i need to use the Events tab in the animation clip, instead of the Events tab in the Animator panel (when creating them IN unity). They are quite different in behaviour. The one for imported animations relies on you providing a function name, and it will then try to find that function and trigger it. Is it possible to incorporate those events into the state machine? Edit: For now i've made a "EnemyAnimationEvents" script that sits on my enemy, which holds functions that the AnimatorController can find for the animation events. These functions will then access the 'Enemy' script and use the respective State instance to call the needed function. So if i have a MeleeAttackEnd event, i will have a EnemyAnimationEvents.MeleeAttackEnd function. This function will call the `_enemy.MeleeAttackState.MeleeAttackEnd` function. I intially wanted to make an empty GO on the Enemy called "AnimationEvents" which would hold seperate scripts with functions. One script per animation, but sadly the AnimatorController cannot search for functions in child objects, it only searches through the scripts on the gameObject in which the AnimatorController resides on.
On the surface, there is a lot of useful knowledge here. Too bad it is passed in such a hurry and it takes several times to rewatch it to keep track of what's going on... It really spoiled this tutorial.
Плохой пример. Не для игр. Вместо наследования нужно использовать композицию. Создавать врага из разных компонентов, а не создавать один класс Enemy и давать ему интерфейсы
Too many scripts for my liking. I like to keep it simple and easy to find rather than having so many script that need each other to run some simple task.
I keep wondering if I am just a horrible beginner or if these are bad tutorials. I think he types way too fast (if its not edited to speed it up) and doesn't explain hotkeys that he uses, like at 4:22. I have no idea what happened there, and the code is minimized so I cant see what I'm missing, since he now has 10 more lines of code than I do.
@@ZCFHUAfhnvjf the minimized code is something that was previously already written 3:45 So you weree not missing anything. And he used right click before that to add the other part of the code that generates itself instead of having to write it himself will be the same for everyone.
nice video, but state machines don't mean better performance, most of the times actually they aren't less performant. state machines generate more garbage and they produce a lot of cache misses. this is not a problem; 99.99% of the time, this will not be impactful for your game. however, 'performance' shouldn't be counted as a state machine's advantage.
The AnimationTriggerEvent is kinda slow how do i make it fast? I want to change to another animation after the current animation ends but it doesn't, if turn on animation loop time it takes two to three loops to take effect.
Hi. Do you by chance know how to export an android apk from unity? i keep getting some file when i press build and not the apk, also takes pretty long to build. I get a buildmethod error message at the bottom left part of the unity screen.
Who else is doing tutorials like this right now?! Killing it man
holy CRAP!!!!
Dude thank you SO much for your support, I don't even know what to say...That's so generous, Nikki and I appreciate it from the bottom of our hearts
Mason my man... doing lots of good in this world :)
Mason is the one who knocks
thank you
There are quite a few other Creators/dev doing this right now. Maybe have a look for "state machine tutorial Unity", you'll find at least a dozen.
With the view counts increasing, and the super generous donor under this video, the future looks bright for your channel (AND studio!). Thank you so much for these videos that are honestly worth putting a price tag on. You guys take care!
Thanks so much! That really means a lot!
I feel like I'll need to watch this like 10 more times before i can even start keeping up xD awesome tutorial though, making it all so clean and look effortless is inspiring
Ok just went through the video once and my mind just blanked out at some point. I need to rewatch this a few more times cause there's just so much info there. And I want to understand this completely. Thanks
Same.
As a professional programmer, who's predecessor's primary thought was "just make it work", that thumbnail hits hard.
I used to code like that once upon a time. So it hits hard for me too
Oooh, I love the way you showed 3 editor windows simultaneously :)
Thanks! I would have loved to have synced them up but it would have taken too ong :D
I think it's one of the best tutorial I ever encountered, I gained so much just by watching this 16 minutes video. Thank you so much for this !
Just subscribed off this video alone. Some people may hate the amount of scripts here but I love how compartmentalized this is. So easy to follow, even as someone who has yet to implement a state machine yet. Great background story you guys have as well. Hoping the best for you two!
A very good tutorial that explains this advanced concept in an easy to digest way. One of the best tutorials for anything I've watched.
This really helped out a lot. I was doing the same kind of scripts but i was communicating the scripts together in different order which was making me confused at times. The way you do it was very easy to follow.
This is really helpful and well put together. I loved the super quick and casual interface explanation I've been needing to learn that more in depth and that clicked really well how you explained it. Thank you sir.
As a student , I really learn a lot from your video, which makes my final report excellent in this semester, Thanks~
no way there is someone who can follow up on all this shit man
Exactly what i thought
This is straightforward and makes much more sense compared to other tutorials by more popular UA-camrs out there like CodeMonkey/Brackeys.
The worst thing about these videos is they have to be this long and you kept it as short as possible. All of this doesn't favor the youtube algorithm. Really great video! I won't go into tiny details I think that would make it better. Again, thank you so much for this!
Must be the best state machine i have seen
This is so nice, informative constructions not only the state machine itself. And the explanation was spot on. Great learning source for newbie like me.
Thanks, lots of good stuff in here, appreciate it.
Good tutorial. Clean code. Propogates good programming habits. Respects OOP.
So this is how the pros code... I have a lot to learn!
Really top tutorial I was always curious of the scriptable object approach although never messed around too much with the idea myself. Although I currently working on a update for a game that already been prototyped and has shown enough interest that taking further. I have changed so much that new Enemy AI was needing done was originally going use a plug in but decided that I would be better to reduce the work load, but after thinking I seen your scriptable object approach. That led me back to previous video. Gave thumbs up and sub well deserved and look foward to the scriptable object use for my game as it will allow to do as you say give the exponential behaviours that will work great for my game as it will have procedural generation aswell so this give real variety abilities. So thank you and big ups for your videos
nice. was waiting for that. great jobbb
You deserve much more views!
Great tutorial, having a big file with 2000 lines is a hell when something goes bad. Would be awesome going a little deeper playing around with the AnimationTriggerEvent method, or using some good practices for where start animations on states, etc.. (I've seen some of your vids, seems you use professional practices, and that is what newbies like me need)
I'd avoid nesting colliders like this. The interaction with the colliders bubbles up through the other components on the GameObject. Imagine you're writing a top down space shooter and you're implementing this exact FSM and collider arrangement for a "boss" capital ship. Alongside, the two circle colliders you also have other code that detects a player laser hitting a collider that closely maps the boss ship where you want there to be an explosion. As the laser triggers each collider an explosion will be displayed, most of the time well outside the RigidBody model. Much better to avoid the two circle colliders and simply calculate the distance between the "boss" and the player in the EnemyAggroCheck and EnemyStrikingDistanceCheck classes via a Vector2/Vector3.Distance call in the Update method.
Otherwise, this is a great intro to FSM and the follow up ScriptableObject FSM tutorial is genius.
Can you just set these objects to a specific layer & set the layer collider matrix accordingly?
With this you saved my life, thank you very much.
0:18 //move... LOL!!! thanks for the tutorial, as a beginner this is hard to understand, I might have to watch the video like 10 times before I totally get it, but who said programming is easy xD
Great tutorial. One question, how to make Enemy State class support different types of enemy that have their own RandomMovementRange and Speed?
If you are a newbie, make a smaller scale of your ideal game. Then, use that as a foundation.
Great Video, I ran into a nullpointer exception in fixed update because it was called before the start method and had to get the rb component within awake function of my enemy class
At this point I realised that my code is sh1t, thanks for showing an example for a better code
This is a great architecture. Thank you :)
Thanks man, this helped a lot.
great job as always!
Very informative video! Love your explanations!
Wow Very Detailed Explanation ❤
very informative tutorial, great job
I'm getting a NullReferenceException when I try to call PhysicsUpdate(). But the error goes away if it's called from Update() instead of FixedUpdate(). Any ideas?
I just found out Update() is not even being called.
I believe if you left Start and Update methods in Ghost class it somehow overrides Enemy Start and Update with nothing and, therefore, can't find some reference in FixedUpdate.
Add "StateMachine.Initialize(IdleState);" in the Enemy class Awake function just below the state variables. The state has to be initialized first
The amount of information is just awesome 🔥, only if u could slow down the pace a little bit it would be easier to watch than pausing everytime , still thanks for the great information.
Unbelievable, thanks!
Already lost me at 3:20. When I right click there's no option for "quick actions and refactoring". Even if there was, where did all that code come from? I was hoping this could be a standalone video.
that's really help full, thanks for this tutorial! im trying a multi statemachine for different behavior and that solve the problem for different types of interactions. i was now woundering is the quick override an extension or something, i type all the overrides and im getting crazy now
It's possible to do it without public states fields. I guess public fields is something wrong, isn't it?
what's about this aproach for time cooldown system?is it worthless? I meant I Like to control a lot my attack possiblity and make desicion for my rpg game. I do not trust so muh in Mult state machine inheritance. but probaly scriptable object can be easier can be little tricky special for save-load game approach.
At first, i really appreciate for making such great video. I want to ask about something. I tought, if we use getter and setter structure for both character properties and animation state machine, wouldn't it be more difficult to understand? I'm not expert of this, but maybe we can use switch - case for state machine, and for the character properties (such as durability or move speed) we can use getter and setter form. What are your thoughts on this? Thank you.
this video is awesome and contains a bunch of information. you clearly know what you want to get done and seem to implement all of it pretty seamlessly. for me however i am just starting and looking to understand state machines better and this video moves pretty quick and contains a lot of information that im getting lost with, i implemented a state pattern from another creator 'iHeartGameDev' but a few of my more knowledgeable friends said perhaps it was a sub-par example/implementation of a state machine, even though it was functional. do you perhaps have another more 'beginner friendly' youtube video or article that you could recommend to me?
Good stuff. Been thinking about trying statemschines for animals in a game I'm working in.
Struggling to figure out how to implement this is a way that lets me base state movement stats over to my main player script. Feels like I'd have to implement a lot of interfaces and possibly end up with double code?
Hey! Don't know if you're still answering comments but I had a question about one of the things you showed.
I was following the tutorial and noticed that in order for my enemy to properly initialize, the "Ghost" needs to have it's start function removed, even if it was empty before removal. (This took way too much debugging on my part to figure out 🤦♀)
If the ghost had a Start function in it at all, the Start function on the Creature script would never run, and thus never initialize a state.
Does this mean that we're not able to run code on Start for the Ghost? What would be the best way of handling enemy specific logic that we want to run on Start but don't want to put in the Creature class itself?
Thanks so much! Great vid :)
Thanks for tutorial, quite informative but I found a problem. I guess you gonna have memory leaks with such cross reference since Enemy knows about State and State about Enemy. Am I right ?
Shouldn't the reference to player be static, that way you don't need to call it in the constructor and all enemies will share one reference to the player??
What are less expensive to check distance every frame. Thanks in advance
What I don't understand is, you create the Chase logic in the ChaseState, but what if different Enemies have different chase logic? I guess I don't expect any respond for such old video, but if anyone sees this you are very welcome to explain to me if this is how it's supposed to be used or if it's just an example.
I think you just create a new class name like SkeletonChaseState : EnemyState for Skeleton enemy or something else and override update in skeletonchasestate.
@@nguyentrandinh8065 Ah, makes sense I guess
for check radius . is physic trigger more performance than check for distance??
I am so confused about what happened at 4:22. I'm following along and then all of a sudden in a split second you must have hit some hotkeys and made something called regions? You didn't explain it at all and now I have less lines of code than you but they aren't visible in the video
7:55 generate constructors literally just doesnt show up for me
if you are using vscode than at 4:22 to do the same thing left-click on the interface and press ctr+. and select "implement interface" at 7:55 instead i think it's a vs feature only not implemented in vscode, at least i did not find a thing that does that automatically
Great tutorial! But can you please add "FSM" or just "State machine" in the title? (For the future searches)
Hi! Ive followed the complete tutorial but I cant understand why the movement speed is so slow for me when is chasing the player. Idle speed is the same as the chase one, but chase direction is calculated 10 times small than the other one. Do you know what can it be happening?
one way you could make this video better is to add you using the final product state machine to easily build another enemy using the objects you just created, i know, you'll end up using more prefabs which in essence, are prefabricated lol but it still might help
The AnimationTriggerEvent is kinda slow how do i make it fast?
I want to change to another animation after the current animation ends but it doesn't, if turn on animation loop time it takes two to three loops to take effect. How do i fix this?
Would there be any performance implications due to any empty FrameUpdate and PhysicsUpdate calls? I imagine there will be lots of enemies using the Enemy script, some of which will not require FrameUpdate or PhysicsUpdate to be called. Won't this cause some overhead?
why your camera is so close? You spooked me
did not understand shit xD! I will see it again and try to do it
Good tutorial. At 10:15 I thought your enemy was varying his speeds and I was so confused. Trying to find a bug in my code or how yours could be doing that. After inspecting closer it looks like actually you just moved the hero which moved the camera and so it just looked like it was going at a different speed. The background is blank so it was hard to tell.
Anyway. I found this pretty useful and will continue along. Thanks for the vid.
This is really interesting. I'm not sure I've ever seen a enemy/behavior state coding tutorial like this. It's tricky for novices (like me), but I can see how this could save time in the long run making behaviors that can be switched around.
Now, random question, I'm starting to interview indie devs on my channel for a series about developers talking about the games they're making, the tools they use, and games that inspired them. Would you be interested in an interview??
I'd be interested in doing an interview.
Hi. Do you by chance know how to export an android apk from unity? i keep getting some file when i press build and not the apk, also takes pretty long to build. I get a buildmethod error message at the bottom left part of the unity screen.
When should I use differenct state machines for different systems? I want to handle animation states programmatically in a state machine like this, I also implemented this state machine for my character behaviours. Should I use only one state machine with a variable currentBehaviourState and currentAnimationState or should I split both systems up into 2 different state machines? In my case, the animation states don't correlate always with the behaviour state. How would you guys handle this?
It's always surprising to me that people create scripts in Unity instead of directly in their editor. Creating scripts from your editor means you don't have to clean out the mono behavior bits and allows much higher flexibility.
14:39 why not show us the better way?
I did this for his if else
if (!enemy.IsWithinStrikingDistance)
{
_exitTimer += Time.deltaTime;
if(_exitTimer > _timeTillExit)
{
enemy.StateMachine.ChangeState(enemy.ChaseState);
}
}
else
{
_exitTimer = 0f;
}
That's a BIG NOSE!!!! =)
Great tutorial! If i use imported animations for my 3D game, i need to use the Events tab in the animation clip, instead of the Events tab in the Animator panel (when creating them IN unity). They are quite different in behaviour. The one for imported animations relies on you providing a function name, and it will then try to find that function and trigger it. Is it possible to incorporate those events into the state machine?
Edit: For now i've made a "EnemyAnimationEvents" script that sits on my enemy, which holds functions that the AnimatorController can find for the animation events. These functions will then access the 'Enemy' script and use the respective State instance to call the needed function. So if i have a MeleeAttackEnd event, i will have a EnemyAnimationEvents.MeleeAttackEnd function. This function will call the `_enemy.MeleeAttackState.MeleeAttackEnd` function.
I intially wanted to make an empty GO on the Enemy called "AnimationEvents" which would hold seperate scripts with functions. One script per animation, but sadly the AnimatorController cannot search for functions in child objects, it only searches through the scripts on the gameObject in which the AnimatorController resides on.
Did you put microphone near keyboard to record the clicks?
Lol! Yes. I love the clicks
Why not using Scriptable Objects?
he uses them but just on the video about state machine after this ua-cam.com/video/iOYo7flBUW4/v-deo.htmlsi=fjEPWB4xWPzVQ2U8
This is so fk complicated my pepega brain is exploding
On the surface, there is a lot of useful knowledge here. Too bad it is passed in such a hurry and it takes several times to rewatch it to keep track of what's going on... It really spoiled this tutorial.
Decoupling
Плохой пример. Не для игр. Вместо наследования нужно использовать композицию. Создавать врага из разных компонентов, а не создавать один класс Enemy и давать ему интерфейсы
Too many scripts for my liking. I like to keep it simple and easy to find rather than having so many script that need each other to run some simple task.
well, it was interesting, but quite brainbreaking, at least for me
First
you know a lot of programming...but the part where you explain it to people is...horrible.
I keep wondering if I am just a horrible beginner or if these are bad tutorials. I think he types way too fast (if its not edited to speed it up) and doesn't explain hotkeys that he uses, like at 4:22. I have no idea what happened there, and the code is minimized so I cant see what I'm missing, since he now has 10 more lines of code than I do.
also, LONG LIVE SAKARTVELO
@@ZCFHUAfhnvjf the minimized code is something that was previously already written 3:45 So you weree not missing anything. And he used right click before that to add the other part of the code that generates itself instead of having to write it himself will be the same for everyone.
nice video, but state machines don't mean better performance, most of the times actually they aren't less performant. state machines generate more garbage and they produce a lot of cache misses. this is not a problem; 99.99% of the time, this will not be impactful for your game. however, 'performance' shouldn't be counted as a state machine's advantage.
what do you recomend, i have seen state machine done in the animator with behaviours but i dont know which one is better
The AnimationTriggerEvent is kinda slow how do i make it fast?
I want to change to another animation after the current animation ends but it doesn't, if turn on animation loop time it takes two to three loops to take effect.
Hi. Do you by chance know how to export an android apk from unity? i keep getting some file when i press build and not the apk, also takes pretty long to build. I get a buildmethod error message at the bottom left part of the unity screen.