I need to make a prop class where props can be either StaticMeshComponents or DestructibleComponents. Their behavior will be entirely identical with the obvious difference being one can be destroyed and the other never destroyed.
Looking at their hierarchy the closest common abstract class for the two is MeshComponent.
My idea was (likely a poor idea) to make a class derived from UMeshComponent that implements the common logic for all props and then, I’m not sure.
Looking at the excellent diagram I’ve made Screenshot - f2510488d96c6604392fc46313ccaf6c - Gyazo
Will I have to make a new class for each item there so that each new item derives from a custom version of those original classes?
For example I’m anticipating having to make a MyPropMeshComponent, then a MyStaticMeshComp which MyPropMeshComponent derives from.
Then for Destructible I’ll have to make a MySkinnedMeshComponent, a MyDestructableMeshComp followed by a MyPropDestructibleMeshComponent.
This seems really silly to have to make 6 new classes just to avoid duplicate code. But is this my only options?
Am I overlooking something?