How can change a static mesh material via blueprint

Hi guys,

I made a script that lets the publisher choose to static mesh and shows the materials used in it. Then I wish you could change this material. I’ve tried many ways and I am not finding solution. Can you help me.

Hello, I’m listening but I’d like to know that object is a pawn or an actor.

Well, on the left side tab of the editor, you can find variable tab.
Default static mesh / Custo’n’staticmesh (which is typing error I think…)
You can select those variable and see Detail tab, and you can select meshes and assign into those variables.
but you must compile your blueprint otherwise you’re not able to fix those meshes.

Sorry MeepMeep

I wrote the wrong title. I want to be able to change the materials used in static mesh. The user can change the static mesh and the system updates the list of materials, only want to be able to change them.

I’m able to change the static mesh, which can not change is the materials

Your code is referring “Default Static Mesh” variable’s material, therefore you need to change that Default Static Mesh variable’s material ( if you simply don’t want to change those code… ) You can double click that default mesh and edit/explore that material’s name also. Hope I’m talking about that you asked. It’s confusing that I remember you asked about meshes ( I found that you commented, it’s okay though! :slight_smile: )