PostEditChangeProperty in SceneComponent works wrong in editor

Hello. I am trying to use “PostEditChangeProperty” in “SceneComponent”. It works fine if i change property in Blueprint’s Detail panel (cube rotate), but when i change property in Editor’s Details panel nothing happens (cube don’t rotate). As I understand it, this is because after “PostEditChangeProperty” is called the constructor is called also. How to fix it?

UMySceneComponent::UMySceneComponent()
{
	UE_LOG(LogTemp, Warning, TEXT("UMySceneComponent"));
	PrimaryComponentTick.bCanEverTick = true;
	SMC = CreateDefaultSubobject<UStaticMeshComponent>("StaticMeshComponent");
	SMC->AttachToComponent(this, FAttachmentTransformRules::KeepRelativeTransform);
	static ConstructorHelpers::FObjectFinder <UStaticMesh> StaticMesh(TEXT("StaticMesh'/Engine/BasicShapes/Cube.Cube'"));
	if (StaticMesh.Object) SMC->SetStaticMesh(StaticMesh.Object);
}
void UMySceneComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) {
	UE_LOG(LogTemp, Warning, TEXT("PostEditChangeProperty"));
	if (PropertyChangedEvent.GetPropertyName() == GET_MEMBER_NAME_CHECKED(UMySceneComponent, Angle)){
		SMC->SetRelativeRotation(FRotator(Angle, 0.0, 0.0));
	}
	Super::PostEditChangeProperty(PropertyChangedEvent);
}

Hey, did you ever find a solution to this? I’m running into a similar problem: https://answers.unrealengine.com/questions/975425/uscenecomponent-showing-blueprint-archetype-values.html

See my comment on the question above. I found a solution for this and thought I’d share here for searchers.

I created a USceneComponent, with 2 child USphereComponents, and 2 UPROPERTYs for the radius of each sphere.

The challenge was to set the radius of each sphere from the properties, so the editor updated nice and pretty.

PostEditChangeProperty was a dead end solution for this challenge. The values kept reverting to the default BP values - because the object is re-created after this function is called. You can’t get there from PostEditChangeProperty.

Another option was InitializeComponent(), but I got Activate() to work first.

URealityInteractionComponent::URealityInteractionComponent()
{
	UE_LOG(LogTemp, Warning, TEXT("URealityInteractionComponent()"));
	PrimaryComponentTick.bCanEverTick = false;

	PreviewSphere = CreateDefaultSubobject<USphereComponent>(TEXT("PreviewSphere"));
	PreviewSphere->SetupAttachment(this);
	PreviewSphere->SetSphereRadius(PreviewRadius);

	InteractionSphere = CreateDefaultSubobject<USphereComponent>(TEXT("InteractionSphere"));
	InteractionSphere->SetupAttachment(this);
	InteractionSphere->SetSphereRadius(InteractionRadius);

	SetAutoActivate(true);
}

void URealityInteractionComponent::Activate(bool bReset)
{
	UE_LOG(LogTemp, Error, TEXT("Activate"));
	Super::Activate(bReset);
	InteractionSphere->SetSphereRadius(InteractionRadius);
	PreviewSphere->SetSphereRadius(PreviewRadius);
}

Thanks a lot.