How do I create and attach a static mesh component to an actor from an actor component blueprint?
I'm inside a blueprint actor component, that has been added to an actor. From this component, I'd like to create a static mesh component and add it to the actor. However, no matter what I do, I can't seen to be able to call the function to create a static mesh component. The same thing works fine from within a blueprint actor (not component.)
For example, I've tried getting my owner actor, and then try to find the "add static mesh component" function on that actor reference, but that function doesn't show up (even with "context sensitive" turned off.)
Here is the trick I used:
I created my actor component to be a child class of InstancedStaticMeshActorComponent. This way you will have access to a mesh component in your actorComponent. You can set its static mesh and material then you need to call addInstance onto self inside the actorcomponent code. Once everything is setup as you want, you just need to call attachToComponent on self.
Here is a capture of my code to make it more clear: https://blueprintue.com/blueprint/ebygofen/
Follow this question
Once you sign in you will be able to subscribe for any updates here