Hi guys,
I am trying to pretty much replicate the example provided for SArrayProperty [here][1]:
void FMeshComponentDetails::LayoutDetails( IDetailLayoutBuilder& DetailLayout )
{
IDetailCategoryBuilder& DetailCategory = DetailLayout.EditCategory("Rendering");
TSharedRef<IPropertyHandle> MaterialProperty = DetailCategory.GetProperty( "Materials" );
DetailCategory.AddWidget()
[
SNew( SArrayProperty, MaterialProperty )
// This delegate is called for each array element to generate a widget for it
.OnGenerateArrayElementWidget( this, &FMeshComponentDetails::OnGenerateElementForMaterials )
];
}
...
/**
* Generates a widget for a materials element
*
* @param ElementProperty A handle to the array element we need to generate
* @param ElementIndex The index of the element we are generating
*/
TSharedRef<SWidget> FMeshComponentDetails::OnGenerateElementForMaterials( TSharedRef<IPropertyHandle> ElementProperty, INT ElementIndex )
{
return
SNew( SAssetProperty, ElementProperty )
.ThumbnailSize( FIntPoint(32,32) );
}
Which should result in this:
However, SArrayProperty is nowhere to be found (I even did a search for the text in the engine source). Has it been deprecated? If so, what is an elegant way to achieve the same effect?
Edit: By the “same effect”, I mean an editable widget array, complete with its own add and delete buttons, like in the example above.