Inherited UBoxComponent not editable in Blueprin

Hello guys,

I’m developing a generic class for Characters intended to be used by BotCharacters and PlayerCharacters. Unfortunately, I’m struggling to add a new Component (UBoxComponent) visible in both characters as it is not getting editable on blueprint.
I have read many posts on answerhub, but nothing has solved the problem.

The code for GenericCharacter is the following:

class ARENAPROJECT_API AGenericCharacter : public ACharacter
	// Default method of all UE classes
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	UBoxComponent* MeleeColisor2;
// Implementation
AGenericCharacter::AGenericCharacter(const FObjectInitializer& ObjectInitializer) 
	UBoxComponent* MeleeColisor2 = ObjectInitializer.CreateDefaultSubobject<UBoxComponent>(this, "MeleeColisor2");
	MeleeColisor2->bEditableWhenInherited = true;

After extending that class on BotCharacter, it doesn’t allow to edit. Am I missing something important here?

Guys, I just realized a mistake… UBoxComponent* MeleeColisor2 = ObjectInitializer.CreateDefaultSubobject(this, “MeleeColisor2”);

I was declaring a new variable inside the constructor… Sry guys. Problem solved.