SArrayProperty, where is it?

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:

https://docs.unrealengine.com/latest/images/Programming/Slate/DetailsCustomization/sarrayproperty.jpg

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.

Good question, I can’t find SPropertyArray or SProperty either, that doc seems pretty dated as well.

same here ;/

https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Editor/PropertyEditor/Public/PropertyCustomizationHelpers.h

This source header has publicly exposed functions and classes for building common editor views like you have shown. It is poorly documented but well designed, so you should trudge through the code to understand what needs to be done for the desired property editing layout/funtionality.

I answered… check it out, there is more code in the Property Editor module to help you out.

Also - what happened to this SAssetProperty class? I searched entire source code and whole internet from google to yahoo search - not a single ■■■■ trace of its existence (other than documentation pages).

You can use FDetailArrayBuilder