Is there a reason why HiddenComponents is a TArray instead of a TSet? It’d be simpler for deleting Components that must be rendered. And it’s already using “AddUnique” so it seems that it should have been a TSet.
class USceneCaptureComponent : public USceneComponent
{
GENERATED_UCLASS_BODY()
/** The components won't rendered by current component.*/
UPROPERTY()
**TArray<TWeakObjectPtr<UPrimitiveComponent> > HiddenComponents;**