Download

WEIRD BUG - Child blueprint breaks when I edit the Parent BP

Hey :slight_smile:

We have a blueprint that is the parent to every pickup actor in our game. I’ve been adding to it gradually through the development but recently whenever I add or change anything in the parent, all the variables in the child disappear until I recompile the child BP. Also I am using ‘get class defaults’ often and suddenly all the variables disappear there too, causing the nodes to disconnect and break other blueprints that make use of it.

If I recompile the child blueprints and fix the connections to the ‘get class defaults’ node then it seems OK, until I try to make a build of the game and the error comes back.

I’ve used source control to go back to older versions of the blueprint from 1,2, and even 6 months ago and the same thing keeps happening, even though it was never an issue editing the parent back then.

I’m using 4.17.2

So I’m pretty much stuck and couldn’t find anything else on the forums. Is this a corrupted blueprint or a bug in unreal? I don’t think I’ve done anything wrong here! :confused:

UPDATE
I’ve been looking through all the child blueprints and found some weird stuff. Some of them have the nodes ‘ReceiveBeginPlay’ ‘ReceiveTick’ and ‘ReceiveActorBeginOverlap’ that have appeared out of nowhere or replaced the normal event tick and begin play nodes. Also some have ‘user construction script’ instead of the normal ‘construction script’ nodes.

Some of the child blueprints are missing the the ‘open full blueprint editor’ button.

If you google “UE4 child variables reset” or other variations, you’ll find a ton of people reporting and asking about this. It is a known, unsolved bug in UE4.
There are some work arounds you can do, such as the use of a data table to set the values when the actor is created.

Hey, thanks for the suggestion and I’ve encountered that bug before but this is a different one. It’s not resetting the inherited variables - they actually disappear completely until I re compile the child BP. This then breaks ‘get class defaults’ node as all the variables there disappear and it disconnects the node from everything. This causes errors and even if I fix the connections by re compiling the child and connecting the get class defaults again, it all breaks again when I either re open the project, edit the parent or try to build the project. Building the project is currently impossible because of this, even if everything is fixed before I build it breaks again during the build.

Oh man, that sounds like a massive headache. I haven’t encountered that before but I hope you solve it somehow.
Something to consider is that maybe these ‘get class defaults’ nodes may perhaps be the cause…? Are you able to clone the project, and in the clone project delete those nodes in some of the children and see if that fixes those children?

Yeah, it’s a nightmare!. It really seems like a corrupt BP or an engine bug as the whole Parent/Child thing seems to be not working properly and weird stuff keeps happening with it like disappearing variables and random nodes appearing lol. I’ve used ‘get class defaults’ node ever since the start of this project (a couple of years) and it never caused a problem before. I’m actually not using it in the child blueprints anyway. I could try deleting it but I’d have to re build the pickup and inventory system in a different way which would be almost impossible at this stage! It’s not an easy thing to replace as the entire game revolves around it. Bah.