Mesh component on children of Blueprint character classes sometimes loses all set properties

Hey there,

I’ve been running into this problem since 4.7 and it’s driving me up the wall! I only work in Blueprint but still try to maintain programming good practices. So for every project I’ll create a custom base Character class that I will derive from for the _Player, _Enemy and etc. The problem is that sometimes without warning the Mesh component on these _Player and _Enemy children classes will completely lose their settings every time the editor is shut down and re-opened.

The worst part is I don’t know how to fix it, or even what causes it so I can avoid doing it in the future. It’s plagued me on literally every project I’ve done.

Here’s an image to illustrate the issue:

I’ve managed to successfully replicate the issue by migrating just my character class into a new project. You can download it here:

Reproduction steps:

  1. Open project
  2. Open CSCharacter and observe the default variables in the Mesh component
  3. Open CSCharacter_Player and observe the default variables in the Mesh component, notice that they are not set
  4. Manually reset the CSCharacter_Player variables in the Transform, Mesh and Animation Blueprint to what the image has above.
  5. Save.
  6. Re-open project.
  7. Open CSCharacter_Player and notice they are once again reset

Is this a known issue? Is there any kind of fix that can be done on my end?

I am having the same exact issue in 4.8.2

We’ve had this happen a few times with our characters as well, and it’s pretty annoying. What I ended up doing that seems to have fixed it for the time being is to recreate our child pawns by right clicking the parent and selecting create child from blueprint. Our other characters were originally made by duplicating, then setting the parent manually under Class Settings a while back, on 4.6. We didn’t have much functionality then, so it wasn’t a problem, and for a while we assumed it was something that broke when we upgraded from 4.7 to 4.8, as we jumped right onto the preview builds rather than wait for the official release.

Since recreating our blueprints this way the only time we’ve encountered the issue is when a parent class is updated and compiled, the child class gets updated, but is then reverted. A quick fix that worked for us, and may for you, is to make a change to the parent that requires it to be recompiled. When we did that the proper values propagated down to the children and both assets, once saved, retained those values on restart.

We had exactly the same issue in UE4.10, but I think we have found the reason. Apparently the mesh in the mesh component is reset in the child actor if it has set exactly the same mesh as in the parent. As soon as you set another mesh than in the parent, this setting is remembered even after editor restart.

Does this solve your issue?

Same issue here on 4.10.4 (and on previous projects using several builds actually).

I have the very same issue currently in 4.10.4. The suggestion from Haimat seems to work. Thank you for that.

Still seeing this in 4.13.2. Haimat’s solution worked for now. Thanks!

Haimat’s suggestion worked for the character mesh issue. However, now the animation blueprint has been removed from children when the project is built.

Seeing this in 4.16.2 too!

Seems to be a blueprint fault by design that will stay. I believe it happens when UE crash and rebuild the project or when you change the parent or its dependency. Then UE is not sure how to deal with defaults and may reset child’s with parents default. You need to be careful when working with child, interface and function override. C++ is better on this.
This behavior is not an option, a work around on this is to not using “default override”, rather have an own child blueprint for each default setup and set the default values in constructor, begin play or some init function. You may hard code, read from a data table or database.
Create a thin player/enemy child blueprint for each default, instead of having one blueprint that you setting the default in the UE world instance. It may actually be better to set default by the blueprint rather by the UE. Then you can just drag n drop objects into the world without tamper with default every time. Yes, more files it will be, but its better then rework your default when the project starts to be big. Version management may save you if you see default loss in time.

Thanks for the comment Swe08. I’m not exactly sure how to reference all of the values from the child actor components parent and hand them off in the constructor but it’s definitely better than having to rework once the project starts getting bigger.