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?