Ok so here is the setup:
We have a main character blueprint that is based upon our own c++ character that in turn inherits from ACharacter. Very standard setup. They have a First and Third person mesh much like ShooterGame
We then have 4 child blueprints of our character blueprint, that only change a few materials and settings.
After doing something completely unrelated, two of the child blueprints seemingly loose their reference to both first and third person meshes. (They are not different from the parent blueprint).
Its possible to get it back by clicking the revert arrow and all seems fine. But at next editor launch the meshes are gone again. (It also seems like it looses transform info, so maybe it affects the entire skeletalmeshcomponent)
After fiddeling around and not being able to fix it, I decided to just make two new child blueprints to replace the broken ones. This works fine until i restart the editor. Now one of the new blueprints have broken but one of the old ones is now working again. This is when I started to suspect it must have something to do with serilization. No matter how many new child blueprints i make, two are always broken and it changes around when i make new ones. So it seems the data on the disk is fine, its something that happens when it loads the blueprint.
Going through recent changes, we tracked it down to a userwidget that was added to our hud. If we remove it from the hud all characters load fine. Put it back and restart the editor and it breaks again.
I even disconnected all the nodes in the blueprint and it didnt help, only if i deleted all of the blueprint nodes would it still work while being in the HUD. Trying some random things, there was a cast to our blueprint gamestate, i changed it to a cast to our c++ gamestate. And now it works again!
Moving on I try to figure out if there is anything in the gamestate that could cause this.
Turns out our gamestate has some variables that are arrays with references to the PlayerCharacter blueprint class. Removing these would also partially fix the problem, but only if i also remove a cast and call to our gamemode.
The gamemode also has a variable containing references to classes of our playercharacter. The gamemode also makes a call to the playerstate that also has this kind of variable.
In all cases i cant get each step to work if i remove these variables or references to other blueprints that have these variables.
This is really weird and i dont know what could be wrong other than some parts of the serializer messing up due to the planets alinging or something.
Im pretty sure this cannot be reproduced in a clean project. But maybe i can send a moderately stripped down version of ours. Its easy to reproduce the problem even with zero knowledge about the project.
Cheers
Jonas