Can you get sub-objects that are inside a blueprint at runtime?

I’m using construction scripts to spawn in some objects in my level. Each actor is made of several meshes. Is it possible to get these sub-meshes and manipulate them at runtime?

For instance, if I have a construction script that generates a tree which contains a trunk mesh and a foliage mesh, can I create logic that would allow the player to destroy the foliage mesh during gameplay, but leave the trunk mesh?

The straight forward way is to create a variable for each spawned component in the construction script. I advice using an array if you are spawning a lot of copies of the same type.

Ah, ok that makes sense. So then I would cast to that object and get the item from the array?

If you know what type of object you are spawning, then all you have to do is create a variable of the same type. No casting needed. Same thing when you get the item from the array.