Files
UnrealEngine/Engine/Plugins/PCG/Source/PCGEditor/Private/Details/PCGVolumeDetails.cpp
2025-05-18 13:04:45 +08:00

30 lines
746 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "Details/PCGVolumeDetails.h"
#include "PCGComponent.h"
#include "PCGVolume.h"
TSharedRef<IDetailCustomization> FPCGVolumeDetails::MakeInstance()
{
return MakeShareable(new FPCGVolumeDetails());
}
void FPCGVolumeDetails::GatherPCGComponentsFromSelection(const TArray<TWeakObjectPtr<UObject>>& InObjectSelected)
{
for (const TWeakObjectPtr<UObject>& Object : InObjectSelected)
{
if (APCGVolume* Volume = Cast<APCGVolume>(Object))
{
TInlineComponentArray<UPCGComponent*, 1> Components;
Volume->GetComponents<UPCGComponent>(Components);
for (UPCGComponent* Component : Components)
{
if (Component)
{
SelectedComponents.Add(Component);
}
}
}
}
}