I have a Blueprint class (BP_PlayerCharacter) that inherits from a C++ class (ASCharacter).
In the Blueprint I have two `Attribute Component`s:
But, in the C++ class there is only one:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = “Components”)
USAttributeComponent* AttributeComponent;```
In the constructor of this C++ class:
ASCharacter::ASCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;
bUseControllerRotationYaw = false;
SpringArmComp = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArmComp"));
SpringArmComp->bUsePawnControlRotation = true;
SpringArmComp->SetupAttachment(RootComponent);
CameraComp = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComp"));
CameraComp->SetupAttachment(SpringArmComp);
InteractionComp = CreateDefaultSubobject<USInteractionComponent>(TEXT("InteractionComp"));
AttributeComponent = CreateDefaultSubobject<USAttributeComponent>(TEXT("HealthAttributeComp"));
GetCharacterMovement()->bOrientRotationToMovement = true;
AttackAnimDelay = 0.2f;
}
The wrong one has a typo that I have corrected yesterday. Its name is `AtrtibuteComp`.
I’ve tried to recompile the solution twice, remove Intermediate, Binaries and Save folders, and I still have the same problem.
How can I fix it?
UPDATE
I have changed the name of the C++ variable, but I get the same in Blueprints:
And also, if I comment the variable declaration (and in the constructor), this is what I see in Blueprints:


