Why re-creating blueprints fixes problems?

Well, I’ve being facing a weird bug for some days.

I have a custom MovementComponent and two different classes use it. Car and Jeep for example, have its constructor like this:

ACarPawn::ACarPawn(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UMyMovementComponent>(AMeshCollisionPawn::MovementComponentName))

and

AJeepPawn::AJeepPawn(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UMyMovementComponent>(AMeshCollisionPawn::MovementComponentName))

But, on BeginPlay(), the two classes call GetMovementComponent() and Jeep always return NULL.

After trying deleting Binaries and Intermediate, and even creating another custom MovementComponent, the solution was deleting the blueprint BP_Jeep and creating another one. That solved everything. And I’ve heard of other cases like mine in the past. Why is this? Any thoughts?

@marianomdq did you answer this question? It’s happening to me right now, but with an incredibly annoying addition: after resetting the Editor, I have to create the Blueprints again to make it work.

This is an occasional problem with hot reloading C++ code. Sometimes when you modify header files there’s a chance that those changes won’t be properly reflected in the Blueprint equivalent - it’s why the usual advice is to close the editor before making changes to .h files, recompiling it and running it from there. If you’ve already made your changes - fully close the Unreal Editor, recompile your game with it closed, then run it again with the Build/Debug option in your IDE and see if the Blueprint is updated.

I understand what you are pointing out.

I would say that my case is a little bit weirder. Every time I close the Editor and open it again, that Blueprint does not initialize properly the Ability System Component and always returns null. However, if I just create a new Blueprint, that new one does get the Ability System Component. So it is kind of weird, to be honest. Nothing like closing the editor and opening again solves my problem, but thank you so much for answering.