Removing and added static mesh component

Hey there, Im having a real hard time with placing static meshes with a widget menu. Using “set static mesh component” shows my mesh horribly lit I"ll add a picture of how they look. Any way, creating a custom event where I place a the mesh with the “ADD STATIC MESH COMPONENT” and appears OK in runtime. Now I need to remove this added mesh o either replace it with another static mesh component. Im posting a picture of how my event nodes look like.!

just in case I wasnt clear enough, removing the static mesh component needs to be set up as an event triggered by a button. I just cant come across the way to do this

You can store a reference to the static mesh component in a variable (the Return Value pin on Add Component). Then in another event you can us “Destroy Component” to remove it.

1 Like

You can add / destroy as many times as you like:

2 Likes

Doing this will still allow the player to add the component again even if it was destroyed? Im kind of new here, would you please please show me what the nodes would look like? I dont know what to connect whit what to what you are explaining. Kind of desperate here

Doing this will still allow the player to add the component again even if it was destroyed? Im kind of new here, would you please please show me what the nodes would look like? I dont know what to connect whit what to what you are explaining. Kind of desperate here

I truly dont know how to thank you enough!! I was so desperate to solve this!! Thank you so so much! Also, is there a reason as to why using just the “set static mesh” is not working fine? I have used it for other projects and meshes seemed to be fine

Yeah no idea why SetStaticMesh isn’t working for you.

Just out of curiosity, is there a way that the same event destroys another mesh object reference object reference and then adds a new static mesh component?

Cannot even explain how much you helped!! Btw is there any tutorial about packaging a project in ue4.26 to html5?