Hello guys, i am new to unity although i have strong programming background from Assembler to C++ some of the Unity workflow is kind of unfamiliar. Most of the advanced implementation patterns possible i gathered from various sources but there are still some i am curious about so bear with me.
Now to the problem, what is more feasible using multiple components on a game object or single one that instantiates/handles other functionality through special classes.
For example lets say i have a generic Enemy what i would do for the sake of decoupling is make EnemyState, EnemyMotor, EnemyAI… classes where State handles its state, hp etc. motor is handling its motion etc.
Should i make all these as separate components and attach them to the enemy or its better to make a single component lets call it EnemyController that will instantiate all the others not necessarily as components and manage everything through it?
Honestly i find the second option more to my liking, not only its more readable its also way more transparent when it comes to reusing classes outside of Unity or vice versa. The downside is overhead in referencing/sending data that would be inherent going the component route.
Thank you.