Can't add a material picker (SPropertyEditorAsset?) to my Editor plugin, what am I missing?

I’m building an editor plugin that needs to display a listview of FStrings and (assignable) UMaterialInterfaces.

I’ve got the listview and strings, but even after trawling through a ton of engine source code, I haven’t been able to find a single widget class that I can actually use or a simple bit of code that gives me one of the material assignment widgets the editor uses.

The widget reflector points to SPropertyEditorAsset, but even after including PropertyEditor in my build file’s private include paths, it’s still not showing up as a known class… and I can’t include the .h file for it.

Anyone have any pointers?

Am I barking up the wrong tree?

I would love to see an answer to this as well! Can anyone help?

if you can #include "PropertyEditorModule.h" in your .cpp file you should be able to use SObjectPropertyEntryBox widget.

t works the same as SPropertyEditorAsset (in fact, it contains one) but wont display the thumbnail unless you specify a property handle and thumbnail pool.

More or less this code should get you on the right track:

			.OnObjectChanged(this, &SMyWidget::OnMaterialChanged)

I did this manually; Probably the answer above is a better way to do it.

I’ve included the header you mention, but it still shows up as undeclared identifier.

According to the docs, SObjectPropertyEntryBox is in Editor/PropertyEditor/Public/PropertyCustomizationHelpers.h, but including that gives me errors in editor\propertyeditor\public\SResetToDefaultMenu.h

(For the record, I’m trying to make a static mesh selector, but it looks like that’s just a minor change).

I see that your PCH includes PropertyCustomizationHelpers.h. I get errors in SResetToDefaultMenu.h(15). Do you know if you had any problems with that as well?

Nevermind, sorted it. Thought to check your and discovered I needed to add PropertyEditor as a dependency. That thing confuses me, but thanks for the help!

Nevermind, sorted that out with my .cs file.

Thanks, that did it.
I’d set it as the right answer, but for some reason, I only get an upvote and no “answer” button.

Hi, I’m struggling with implementing a propertyHandle and ThumbnailPool. Can someone point me to an example that shows me how to use them?

thanks in advance!