Child of Child BP resets mesh material

This is under 4.7.0 actual release, but I don’t think it’s a new bug.

I have a generic “item” BP which has several children BPs for different types of items, some of which are used differently. One of the child items now has two possible meshes for the same type of item, but the material used for one mesh keeps getting reset to the original material. I have tried two different methods, but I keep getting this material bug.

Originally, I had a child of the generic item BP (Cane), which has one material (call it X). I made a child of Cane (Staff), which has four materials, but the first material will always change back to X after I save & quit and reload the project. The mesh in the viewport is wrong, even if I explicitly change it. If I drag an instance of the Staff BP onto the scene, it has X as the first material – I can change the first material to something else, and it will run OK in the editor, but if I build it and run the app, or save & quit and reload, it changes back to X.

I also tried making the child of the generic item BP into (Cane_prototype) with NO mesh or materials, and making both Cane and Staff children of Cane_prototype, but I get the same bug (which appears to be from old/garbage data, since Staff is no longer a direct descendant of any BP with material X – Cane, which has material X, is now a sibling).

Here is a screenshot showing the viewport mismatch:

Hi Brian,

I’ve setup a similar setup as yours with a staff and spheres with four materials. I’ve made a child of the BP and tried to follow your steps, but have not been able to replicate the issue that you’re seeing on your end.

Is this only happening in this project, or in any newly created projects as well? Is this also happening with any other assets?

If you can reproduce in a blank project, can you list numerical steps to recreate as my attempts have not turned up anything useful, unfortunately.

Thanks!

Tim

So far, I’ve only seen this in my one project. I’ll see if I can reproduce it in a new project.

I couldn’t reproduce it in a new project, I’ll try remaking my objects and see if the bug goes away.

Okay. If you get anywhere with that please let me know and I can investigate further and get a ticket in if it’s happening in a reproducible way.

Thank you!

D’oh! My error. I had a leftover set material 0 in the constructor, so of course it was always getting reset. Removing that fixes it.

oh…oops! That’ll cause some problems like this. hehe :smiley:

I’m glad it’s sorted for you now and regardless of the outcome thank you for taking the time to report any issues. It is always appreciated.