Changing Spline Material

So I have created a Spline that generates a mesh when a certain condition is met I want to change the material along the spline, the spline is done via a construction script and using a reference that was created on the construction script doesn’t seem to work.

For testing purposes i’m trying to get the material to change on event begin play.

The Mesh on spline stores the mesh from the construction script.

bump bump. bump bump.

Hello

How are you spawning the “Mesh on Spline”?

Hi i spawn it in a function in my construction script.

^^ Where i call the function in the construction script

Bump Bump.

Are you trying to have each mesh along the spline have a different material? Don’t quite understand what you’re trying to do.

Yes, all I want is to be able to change each mesh (along the spline) material to a custom one not exactly have diffrent materials for each part like have the spline white (like it is now) then in my even graph I trigger it to change to blue. Or something along them lines

After there created so like I have the spline mesh’s set to white then when the player enters a trigger volume it sets them to green.

Ok so like change the colors in as the spline meshes are created? or AFTER they’re created?

Like this?

Oh, so you want the entire spline to change color uniformly after creation when entering a trigger?

133430-ezgif-1-dfb60e6c3d.gif

Yes ! This is exactly what I wanted but the reference I used for my mesh didn’t work

Here’s how I did it: in the construction script I added all created spline meshes into an array. Then, on overlap, I used the array to change the materials on them all.

So i have used what you said and just changed it to fit what i wanted and the material goes away but it doesn’t add the green material it fills it with the standered ue4 no texture.

Does your mesh have more than one material slot?

Sorry wasn’t near my PC, but nope only the one material slot, any idea why it removes the material and doesnt change it

any other ideas as to why it would not add a material but remove it?

If you’d like to upload the project I can take a look for ya. My only guess at this point would be that your “green” material is in fact blank. Silly, I know, but possible… Like I said though I’d be glad to check it out for ya

I’ve tried multiple materials i will quickly try recreate the issue in a blank project.

Edit: So i just fixed it

^That doesn’t work but

^That does