How do I pick specific foliage to spawn from class?

What I’m trying to do here is have the player cause an overlap event (DetectionBox) that will destroy an actor (Self) and spawn an interactive foliage object(Assigned Foliage). What I have below compiles fine and has no errors. The debug all checks out and the foliage actor spawns in but its empty. I don’t know how assign a particular object from the class so here I am. Any help is greatly appreciated.

I would like to keep using UE4 native foliage for resource collection since i already have a system built around it.


You can assign the static mesh here

But another way, is to set the static mesh variable in the blueprint to ‘expose on spawn’, then you can actually assign it during the spawn call.

I apologize for not clarifying further. I have a resource component attached to my foliage object. Used as part of the resource collection. Spawning just the static mesh won’t yield the right result. Or am I misunderstanding your suggestion?

I know nothing about resource components, but was assuming it was something you were trying to setup on the spawned blueprint?

I think im answering your question: The native UE foliage allows attaching a component blueprint. The static mesh is also handled there. The component determines what resource (wood in this case) can be gained from the foliage when its interacted with.

Unless id somehow be able to attach the component to the newly spawned static mesh in the previous blueprint?

Neeeeever used that aspect. Sorry :frowning: