[Bug] Skeletal Mesh Disappears after closing editor for Child BP

Hi!

The project I’m working on has a Player Character Parent, and two child Characters and blue.
After closing the editor the skeletal mesh components of the and blue child actors disappeared.

77493-mesh.png

The screenshot above shows that the skeletal mesh is gone and returning it to default (with the little yellow arrow) brings the skeletal mesh back. When it comes back it is no longer properly aligned.

WARNING IT GETS MORE SCARY

If I create a new child actor, assign a skeletal mesh, and close the editor it works fine. But once I edit the spawning scripts in the custom player controller and game mode blueprints only then does the skeletal mesh disappear after closing.

The BP_PlayerController and BP_GameMode blueprints both handle the spawning of the player and therefore modify the pawn possession and the destroying of the actor. The relevant sections of those two blueprints are below:

I have a hunch that because these two files change the possession, destroy the actor, and spawn actors; they are some how the cause for this skeletal mesh disappearing error.

These blueprints don’t directly mess with the skeletal mesh so I don’t think its a very simple issue. It seems like it is a nasty bug with the Editor. This happens every time the spawn blueprint is updated with the new character whether I close the editor, commit to git, or anything.

PLEASE HELP ME THINK OF SOMETHING

We can’t make much progress testing the game because if the characters spawn correctly, their mesh is gone. But if we don’t make them spawn correctly their mesh is fine.

I’ll update as necessary. Thanks :slight_smile:

Hello kigbariom,

I’ll be looking into this issue for you but I had a preliminary question for you. Is this something that just began happening with 4.10 and didn’t happen in other versions of the engine, or is it something that you just discovered? It would be helpful to know where the problem originated.

Hi ,

This started happening in 4.10 but it seemed to happen only after writing the spawning blueprints. We hadn’t worked at all in older engine versions so I can’t be sure.
Luckily I literally just solved the issue by removing the skeletal mesh and animation blueprint from the parent classes mesh component. I had to make skeletal meshes for each of the subclasses and the issue is no longer prevalent.
Once the children were no longer inheriting the mesh things seemed to work fine. I can close the editor, commit to git, and spawn properly now.

I hope this info helps, and thanks so much for the quick reply!

Thank you for the information. Another question that I probably should’ve asked before. Are these blueprints based off an existing C++ class or are they pure blueprint? If so, is the parent/child relationship part of the C++ classes or are these parents/childs via the blueprint interface?

This is pure blueprint and the inheritance is via blueprint only as well.

Did you ever check to see if this only happened when working with a project that was committed to source control? I’m not having any luck reproducing the issue at the moment and I’m thinking that may be part of it, since you mentioned committing to Git in one of your previous comments. Just making a copy of your project and putting it elsewhere where it won’t be affected by source control should be enough to test that.

I am using Git for this project so I copied it and disconnected it from source control and I have not been able to reproduce the bug yet. Source control might be part of the problem because we only originally noticed the issue when pulling a change from Git.

What kind of change was being pulled? Was it a change to the skeletal mesh being used in the parent class? Even with using source control I’m not getting any results.

The commit I made was my respawning script written in BP. The custom player controller and custom game mode had functions that unpossessed, destroyed actors, and created new actors.

Before that script was added the bug did not occur. In addition, if I made a totally new player character with inherited meshes, it would function normally until I used the BP to spawn that character. Only then would the mesh be deleted.

I’m still looking into this issue, mainly through the other post that your co-worker found here: Character Child Class Skeletal Mesh Default Issue - Programming & Scripting - Epic Developer Community Forums

This is due to being able to get a repro on the issue from his project. I’ll be sure to let you know if I have any additional information to add.

Unfortunately the user from that other post has become unresponsive. I tried taking another look at your reproduction steps that you provided without much luck. I understand that you have already worked around this issue but do you have time to see if you can get it to reproduce in a fresh project?

I will try to repro this issue in a fresh project at some point this week and update here when I find some time.

Hello kigbariom,

Have you had a chance to attempt a reproduction case as of yet? There was mention by a user in the other post that the issue may be fixed by changing the startup map in the project. It could be a reference related issue which would make that fix make sense.

In the meantime, I’ll be marking this issue as resolved for tracking purposes, but please respond whenever you have the time and the post will reopen.

Hi everyone! I see this thread has been marked as resolved so I’m not sure if anyone is still poking around with this issue.

My team is working in 4.15 and we are having an identical issue with child BP character meshes deleting themselves.

We’ll try the solution mentioned up above and report back.

Does this issue sound like a re-spawning issue or an engine bug?

I’m not quite sure but I would be interested to know if the solution is able to help you.

I had just had this problem as well for the last two days In Engine Version 4.15.2, I solved it by just removing the Animation Class in the Parent BP Mesh Settings while Keeping the Skeleton.

I was setting up a Camera (which is attached to a socket on my Child Characters BP) So I Could Switch to Aim Down Sights and Setting up some Blend Spaces in my Animation BP when I started having this issue.

Im sure for me the problem is in the Anim BP Somewhere.

I found a solution that is working quite well! It’s just a few easy steps.

Step 1: Remove the character mesh and animation BP from the Parent. (Set AnimBP to None)

Step 2: In the Child, use the node “Set Skeletal Mesh” to your character. Check “Reinit Pose” and set the inherited mesh as the target.

Step 3: Use the node “Set Anim Instance Class” to your animationBP. Same mesh target

That should about do it.

I have have eight child actors all using this method and it works with all of them, no loss of data or missing characters.

Here’s a couple images to help ya out.

Parent Character

Child

Hey There Guys,

I was able to reproduce this issue in my project as well. I have a game mode that contains an array of teams that in turn contain a Class reference that is used to essentially re-color the player based on which team they are on (mostly because I couldn’t get materials to replicate properly, but that is neither here nor there).

I set the default values for the class which is a reference to a child class of my player. So the inheritance is:
base character → PlayerCharacter → CharacterWithColor
At least that is the structure of it. where the base character is the default class that they give you to use.

In any case. The child characters lose their default setting for their skeletal mash and animation class as well as their relative transform.

Using the suggestion above, I was able to cut down on the copy-paste by putting the “Set Skeletal Mash”, “Set Anim Instance Class”, and “Set Relative Location And Rotation” nodes in the construction script of the PlayerCharacter class that I created. This seems to have fixed the issue for all derived classes for me.

I really would like to see this issue fixed in the future as I am not a fan of needing to re-set those values at Construction time.

I am using version 4.14.3

Glad to hear the suggestion worked for you! It’s definitely still an issue though.