Scaling Box reflection Capture is painfully slow

If some people want to fix it, you need to edit the engine source :

void ABoxReflectionCapture::EditorApplyScale(const FVector& DeltaScale, const FVector* PivotLocation, bool bAltDown, bool bShiftDown, bool bCtrlDown)
{
	UBoxReflectionCaptureComponent* BoxComponent = Cast<UBoxReflectionCaptureComponent>(GetCaptureComponent());
	check(BoxComponent);
	const FVector ModifiedScale = DeltaScale * ( AActor::bUsePercentageBasedScaling ? 5000.0f : 50.0f );
	FVector NewScale = BoxComponent->GetRelativeScale3D() + ModifiedScale;
	BoxComponent->SetRelativeScale3D(NewScale);
	GetCaptureComponent()->InvalidateLightingCache();
	PostEditChange();
}

in reflectioncapturecomponent.cpp, of course, add the signature to the .h.

1 Like