Hi, I am trying to customize my properties panel using IDetailCustomization in UE5.0.2.
I then set these properties to hide or show when my enumeration values change
CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override{
SquareHandle= DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ABaseSpawn, Square));
if(PreviewTypeHanle->IsValidHandle())
{
PreviewTypeHanle->SetOnPropertyValueChanged(FSimpleDelegate::CreateLambda([&]()
{
PreviewTypeHanle->GetValue(LstSpawnType);
}));
}
_Shine_Spawn_Group->AddPropertyRow(SquareHandle.ToSharedRef()).Visibility(MakeAttributeLambda([&](){
return static_cast<ESpawnType>(LstSpawnType) == ESpawnType::E_Spawn_Square ? EVisibility::Visible : EVisibility::Collapsed;
}));
}
But something strange happened to me. When I changed the enumeration value in the editor, it worked and displayed the properties I wanted. But when I don’t focus on this Actor and then click on it, it changes back to its original state and the properties that should be displayed are not displayed
I tried debugging, but its enumeration property is correct, and the property handle is set to display