I’m trying to retrieve the object referred to by an IPropertyHandle, in order to be able to refer to the instance inside Widgets created by the CustomizeHeader function in my IPropertyTypeCustomization subclass.
I’m using the following code:
void FMyCustomAssetPropertyDetails::CustomizeHeader(TSharedRef<IPropertyHandle> PropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& CustomizationUtils)
{
UObject* PropertyValue = nullptr;
auto GetValueResult = PropertyHandle->GetValue(PropertyValue);
...
}
I’m testing by creating a new variable of my custom type inside the Level Blueprint, then compiling.
However, GetValueResult indicates a success, but the PropertyValue remains null.
Digging further around, inside FPropertyHandleObject::GetValue( UObject*& OutValue )
, Implementation->GetValueData()
returns Success, but Implementation::GetObjectPropertyValue()
returns a nullptr
value.
Any ideas why this is happening?
How else should I be trying to access the current blueprint variable that is selected in my customization of the default value inspector?