After hours of swimming in source code, I hope someone here could help me.
How would one create Asset selection box in slate of plugin?
I have made bit of progress using SObjectPropertyEntryBox, but it does not behave properly. Upon selecting, it remains “None” and it does not have thumbnail. OnObjectChanged triggers though, which is nice.
As far as my research goes, the problem is that I need to link SObjectPropertyEntryBox to a variable to edit via PropertyHandle(IPropertyHandle handle). But to create IPropertyHandle, one would need IDetailCustomization. I have tried doing all of that, but CustomizeDetails() inside IDetailCustomization class never executed for me, and it felt too complicated for what I was trying to achieve.
There simple object path that can be used insted of PropertyHandle
My guess is this widget was made to automaticly update state to 1. allow devloper to validate selection 2. as it was primerly made for property editor which is also display changing state of properties, especially in read only mode (VisibleAnywhere)
And you just need to enable Thumbnail:
If you got Slate class, google it to fins API reference age for it and then check FArguments and you will have full argument list
Thanks for the pointers, using object path instead of Property Handle enabled to set/get selected object value.
But in regards to the thumbnail, DisplayThumbnail is true by default. It appears it needs ThumbnailPool to actually display the thumbnail. To get the thumbnail pool, one would still need the DetailBuilder. I hoped I could get the pool using FPropertyEditorModule::GetThumbnailPool(), but that is a private method. Am I missing something obvious?