IDetailLayoutBuilder.GetProperty() does not work when the path refers to members of a class

I want to customise how a class is shown in the details panel. Access members of the class using GetProperty() always returns invalid handle.

UCLASS()
class UMyClass : public UObject
{
GENERATED_BODY ()

public:
UPROPERTY ( EditAnywhere )
FString BaseString;

};

UCLASS()
class UMyActorCmp : public UActorComponent
{
GENERATED_BODY ()

public:
UPROPERTY ( EditAnywhere, Category = “Configuration” )
MyClass* m_Native;
}

The customization is applied to UMyActorCmp, In CustomizeDetails, function I used IDetailLayoutBuilder.GetProperty() with the following options:

  1. GetProperty( TEXT ( “m_Native.BaseString” ) )
  2. GetProperty( TEXT ( “UMyClass.BaseString” ), nullptr, TEXT ( “m_Native” ) )

None of them seems to work. The IPropertyHandle that they return is not valid.

1 Like

I also have the same problem in Unreal 5.4. I need the help. :sob: