I can’t for the life of me figure out how to set up a static mesh inside of an actor component that I’d like to attach to my character actor. Any help would be very appreciated. Is it even possible ?!
In your Character blueprint click on Add Component in the top left corner, select Static Mesh and then select the mesh you need in the Details panel. Don’t forget to attach the component to the Camera or any other component, depending on what you need to achieve.
It is very possible, also modular and helpful all around. The ability to pack chunks of reusable behaviour into Actor Components is simply too good to gloss over.
Actor Components do not have rendering capabilities so they cannot have static mesh components themselves. They can, however, have a variable of static mesh component type. Assign a static mesh to a variable in the Actor Component and then:
If you want to do in dynamically:
Thanks man! I think this just about covers what I was asking!
Thanks for the advise, but it wasn’t what I was looking for.
It has been a long time, but I think it could help others, as I was looking for an answer to this and found this post.
Perhaps instead of a straigt ActorComponent you may use a StaticMeshComponent. It inherits from ActorComponent, with the capacity to add a static mesh.
In the Content Drawer, Create Blueprint Class → type something in All Classes to find it :