How to get IPropertyHandles for the internal properties of an UObject

So I’m currently making an IPropertyTypeCustomization for a struct named FWaveEntry

USTRUCT()
struct FWaveEntry
{
	GENERATED_BODY()
	
	UPROPERTY(EditAnywhere)
	UWaveData* Wave;

	UPROPERTY(EditAnywhere)
	FTest TestStruct;
};

and inside FWaveEntryCustomization.CustomizeHeader(…)

	TSharedPtr<IPropertyHandle> TestStructProperty = PropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FWaveEntry, TestStruct));
	TSharedPtr<IPropertyHandle> TestPropertyFromStruct = TestStructProperty->GetChildHandle(GET_MEMBER_NAME_CHECKED(FTest, TestValue));
	

	TSharedPtr<IPropertyHandle> WaveDataPropertyHandle = PropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FWaveEntry, Wave));
	TSharedPtr<IPropertyHandle> ProjectileSpeedPropertyHandle = PropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(UWaveData, ProjectileSpeed));

I’m able to access an internal value of my FTest struct that’ve I’ve put into my FWaveEntry so I can bind it to a widget, however, when I try to do this with an UObject(UDataAsset) my handle isn’t valid? The handle to just the UObject is valid but any handles I try to get from the internals of the UObject are not valid? I’m guessing this has something to do with maybe IPropertyHandles not supporting UObjects as ik IPropertyTypeCustomization is for structs. Any ideas on how I can get this specifically to work or if there is another way I can bind some widgets to the data in that UWaveData? Like going through FProperties maybe?

Ok so I ended up just getting the UObject* containted in the property handle and casting that an basically generating widgets based off of that data instead of using anything inside of the IPropertyHandles. It’s not the cleanest but it works for what I need it to right now. If anybody still has any suggestions on better ways to do this that doesn’t require me to go outside of property handles that would be greatly appreciated.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.