Spawn actor from class, with same component as the target?

Hello there ! I got another little problem for my game, it’s very simple but I don’t know how to solve it after many issues !
It’s pretty simple :

I create a Blueprint Props_BP, which has a float variable “Matiere”, and a Static Mesh component. So when I drag and drop it into the scene i can easly put some differents values for differents blueprint.Until there, no problem.
One of my mechanics I want it’s when I press “&”, the target touch by the raycast spawn the SAME actor with same variables and same static mesh. I made work the float by an “expose on spawn” and a cast ( check the image below), so it’s work, but the static mesh component don’t have a “Expose On Spawn” so I create the class with same variable, but with no Static Mesh :confused:

Please help !! thank you ! ( sorry for my english, not a native)

If you add a second component “mesh” to your character, leave the “inherited” character mesh blank. On begin play set that mesh component then make it a variable and expose that variable on spawn. So you should be able to change the mesh that way you just need to make it a variable.

I don’t understand all… You want me to add a second component “mesh” to my character but it’s the component I need casting ( Props_BP).

Like this, you see my float MatiereProps, i can take this from my SpawnActorFrom(this)Class in my thirdpersoncharacter, but can’t get the staticmesh component
Thanks

Sorry misunderstood, but here is a BP example of what I mean. You don’t need a new mesh but you do need to “set mesh” in the “Props_BP” by dragging off the static mesh component, “set mesh” and make it a variable that you can then expose on spawn. So from any other BP you spawn the “Props_BP” from you will be able to set the static mesh. Hope this helps! Let me know if this is what you are looking for.

You could drag off the return value of the spawn and say set mesh from there too. The return balue is a reference to the object that was created.