Issue with OnConstruction and PostEditChangeProperty used for a procedural mesh

Hey all,

I have encountered a very weird bug that I cannot make any sense of, so I hope someone out there has the right nugget of info that will make this clear.

When I override the function ‘PostEditChangeProperty’ it seems that my ‘OnConstruction’ is not called anymore.

I am using these methods for a procedural mesh actor, and the desired behavior is that whenever a property is changed in the editor, the mesh will be reconstructed using the newly updated parameters.

Whats weird is that when I do not override PostEditChangeProperty and use the OnConstruction, the mesh is updated properly with the new parameters.

However, if I override PostEditChangeProperty, even though I do exactly the same thing in both methods, the procedural mesh just disappears. I can debug draw the vertices and see that the mesh is still present in the same place, but I cannot see it.

So the combination of these weird behaviors means that I basically cannot use PostEditChangeProperty at all.

Anyone know of any dependencies, like Procedural Meshes need to have their location updated manually if not using the OnConstruction chain of methods as there are methods not called after PostEditChangeProperty?

Would appreciate any insight!
Thanks!

Code is enclosed below, feel free to ask me for more clarification if needed.

void ADynamicHeightfieldActor::OnConstruction(const FTransform& Transform)
{
	UE_LOG(LogTemp, Warning, TEXT("In OnConstruction!"));
	Super::OnConstruction(Transform);

	if (HeightmapTexture != nullptr)
	{
        ReadHeightmap();
        GenerateMesh();
	}

	if (bDrawNormals)
	{
		DebugNormals();
		bDrawNormals = false;
	}

	if (bRegenerateMesh)
	{
		GenerateMesh();
		bRegenerateMesh = false;
	}
}

void ADynamicHeightfieldActor::PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent)
{
	UE_LOG(LogTemp, Warning, TEXT("In PostEditChangeProperty!"));

	FName PropertyName = (PropertyChangedEvent.Property != NULL) ? PropertyChangedEvent.Property->GetFName() : NAME_None;

	if (PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicHeightfieldActor, HeightmapTexture))
	{
		if (HeightmapTexture != nullptr)
		{
             ReadHeightmap();
             GenerateMesh();
		}
	}

	else if (PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicHeightfieldActor, bDrawNormals))
	{
		if (bDrawNormals)
		{
			DebugNormals();
			bDrawNormals = false;
		}
	}

	else if (PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicHeightfieldActor, bRegenerateMesh))
	{
		if (bRegenerateMesh)
		{
			GenerateMesh();
			bRegenerateMesh = false;
		}
	}
}

Call Super::PostEditChangeProperty from your PostEditChangeProperty function.

Thanks!
Should have been obvious in hindsight. =(