Can a custom C++ component have a static mesh inside of it?

Hello.
I’m trying to redo my old weapon system using a custom C++ component. So basically I want a gun component with some functions like fire and reload etc., but I also need a static mesh and I’m wondering if I have to create 2 separate components - 1 for mesh and 1 for functionality or if I can kill two birds with one stone and have both the mesh and the functionality in 1 gun component.

I’m also wondering if this is the best way to do a gun in UE. If you have any better ideas, then it’d be great to hear those.

So I do need 2 components huh?

Ok thanks.

Make a component, make a static mesh component your root component, write all the other code in that component. That’s my suggestion.

Sorry, I was a bit 2 fast on this one. You can make a subclass of static mesh component and write all your code in there. Sorry for the confusion.