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.
Thank you @MrChebik for your answer, however i can’t connect the Static Mesh Class Reference to the Spawn Actor Class value.
But it work with the static mesh.
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
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.