This is amazing! I'm just beginning to make games, and I would never have realized I could do this, but it makes so much sense now that I know about it. Thanks for sharing!
@mosth8ed6 жыл бұрын
Hey man, since you are already headed that direction with this, it would be awesome to see this as a "from scratch" ECS example doing the same thing but utilizing ECS for as much as possible with the same outcome. Thanks! -MH
@hipno34776 жыл бұрын
Great tips! love these quick tutorials, very well paced and clearly explained. Keep it up
@cargorunnerUK3 жыл бұрын
Another question I have is can you control the sequence that Unity calls the Awake or Start or Update functions? My game didn't work and that was because component1's awake method called a method in component2. There was no error message but component2 had NOT had it's Awake method called and so the game data was missing. I was expecting Unity 2020 to dynamically manage the awake calls at runtime. So when I try and use component2, Unity will stop and make sure the Awake method is called on component2 before executing a user defined method on component2. But this is NOT the case. This is very important in your component design - when you have a big component all your Awake functionality or Update functionality etc is in one place you can make sure it executes in a valid order. But when you have many small components I think your design must take into account that it has no idea the order in which the components will execute. I guess this is one of the reasons why people start to build high level manager/controller classes on top of their small components.
@RudolfJvVuuren2 жыл бұрын
Interesting, thx!
@cargorunnerUK3 жыл бұрын
Interesting video, but like the other videos on the subject it is only half the picture so is missing critical advice. Games are usually "world simulations" of varying complexity. So designing smaller and smaller isolated components seems intuitive and a good idea UNTIL you try and make your game work. This is why so many people ask for help as their component based code is getting really hacky and messy. So in your small component architecture design how do you suggest you implement score? When an enemy dies points should be awarded to the correct player. Where is this handled? The bullet? The enemy? The player? Or maybe you have an RPG and you have a sword script. But the damage it does may need to be affected by a crown that the player is wearing and a ring that the player is wearing. Where do you calculate sword damage? Or when a player is hit by an enemy the damage may need to be blocked by a shield component and then reduced by an armor component and also by a magic ring component and then reduced further by the currently active magic spell component. So how and where is the final damage actually calculated? We have all these isolated reusable components that know nothing about eachother.
@RudolfJvVuuren2 жыл бұрын
Good insights, thanks for sharing.
@DarthMerlin5 жыл бұрын
If you use that DestroyOnCollision script, how do you prevent it from running and destroying the object before everything else has a chance to run?
@DoomCatcher2 жыл бұрын
Useful tutorial, when would you use this say vs using events, adding more events on collision rather than the examples you demonstrated?
@XZYSquare6 жыл бұрын
These videos are cool. do you have any more on shader graph?
@WelshGuitarDude3 жыл бұрын
Thing is you end up having multiple components detecting collisions on one object thats not performant if you scale up.