mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 09:35:25 +00:00
Fix repeatedly setting datatable on BPs when not changed
This commit is contained in:
parent
08c00ec4f6
commit
a0f9a6a71e
@ -37,9 +37,14 @@ void FStevesFixedDataTableCustomisationLayout::CustomizeHeader(TSharedRef<class
|
||||
// Find data table from asset ref
|
||||
const FString& DataTablePath = InStructPropertyHandle->GetMetaData(TEXT("DataTable"));
|
||||
if (UDataTable* DataTable = LoadObject<UDataTable>(nullptr, *DataTablePath, nullptr))
|
||||
{
|
||||
UObject* Existing = nullptr;
|
||||
const bool TablePicked = DataTablePropertyHandle->GetValue(Existing) == FPropertyAccess::Success;
|
||||
if (!TablePicked || Existing != DataTable)
|
||||
{
|
||||
DataTablePropertyHandle->SetValue(DataTable);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UE_LOG(LogDataTable, Warning, TEXT("No Datatable found at %s"), *DataTablePath);
|
||||
|
Loading…
x
Reference in New Issue
Block a user