Get Static Mesh name from a foliage

Hello everyone,

I wanted to know if there is a way to get the Static Mesh name, from a foliage please ? For exemple with a line trace by channel & a break hit result ? Or any other way.

Thank you a lot !

EDIT :
I think this need more explanation :

I have Foliage on my map (it’s some trees), but i want them to transform to BluePrints (the BP & the StaticMesh used in the foliage, have the same name) when i put my mouse over it :

My problem is that i can’t get the Static Mesh name, to be able to use it has a class name for the Spawn Actor class.

I’ve tried this :

But like you see, it’s not working :s

Try Static Mesh Class Reference. Foliage does not store such data as Actor Reference, but only the Mesh type.
Screenshot_20200205_231852.png

Thank you @MrChebik for your answer, however i can’t connect the Static Mesh Class Reference to the Spawn Actor Class value. :confused:
But it work with the static mesh.

If you want spawn an object at the clicked place, you can create own Actor.

Screenshot_20200205_234127.png

But, keep in mind that this can negatively affect performance if there are enough such singles.

Thank you a lot for your help, but i’m trying to replace a foliage into a bp when i put my mouse over it.

I can do it easily with many branch and a ‘‘string contains’’, but i’m trying to do it in a way that the class name of the spawn actor is in a variable defined by the static mesh name of the foliage. The static mesh name and the bp name are the same.
Don’t know if i explain it well :s

PROBLEM SOLVED, in case it can help someone else ! :

So i get the static mesh name of the foliage, and thanks to “Find Map” (I didn’t know before this function, i’ve found out by searching !), for each static mesh name i match the correct BP, and make it spawn instead of the foliage.

Thank you everyone again. :slight_smile: