so I have DetailCustomizations function and IDetailLayoutBuilder it works perfectly
I can modify the UI within CustomizeDetails
but when I pass a reference of IDetailLayoutBuilder to an event, IDetailLayoutBuilder no longer contain information of CurrentCustomizationClass so it fails to customize the UI and crashs
demo code (this not a real code so excuse me if there’s any typo) let’s use SetOnPropertyValueChanged as an example (it could be anyother event)
CustomizeDetails(IDetailLayoutBuilder& detailBuilder)
{
myHandle->SetOnPropertyValueChanged(FSimpleDelegate::CreateSP(this,&myClass::OnNumElementChanged, &detailBuilder));
}
Now this details Builder when it hit it no longer contain CurrentCustomizationClass so when i try something like
void myClass::OnNumElementChanged(IDetailLayoutBuilder* myDetailLayoutBuilder)
{
myDetailLayoutBuilder->GetProperty(GET_MEMBER_NAME_CHECKED()); //fails
myDetailLayoutBuilder->EditDefaultProperty(myhandle)->CustomWidget … //again fails
}
I want the custom modification to happen whenever this event is triggered
but the object in CustomizeDetails is not the same as the object in OnNumElementChanged
the first one has CurrentCustomizationClass and the second one doesn’t
how can i make the code in OnNumElementChanged work