Sorry if a similar question has already been asked, I did a brief search and didn’t find anything with a real conclusive answer.
I come from an OOP background, and while I think I have finally grasped Component scripting, I still have one question I haven’t been able to answer:
Is it better to use small and precise components or larger components that contain all the functionality required?
What I mean is something along the lines of this example:
Say I am making an RPG. The first thing I need to add is Health. So I make a component for Health. Then I make a component for energy, and one for level, and one for type(humanoid, beast, whatever), etc. I end up with a ton of components on one single object.
But If I know for sure that all of those components will be on every single living thing, is it a bad idea to make a single LivingObject script that contains all of that functionality?
I’ve always seen people split up their functionality into many scripts, but that seems cumbersome to me, especially from an OOP perspective where I’m used to having one class per object.