Within a plugin I am creating I need to select as static mesh to spawn in the viewport. I have had difficulties in getting to use the details panel customisation methods due to lack of proper documentation and incomplete tutorials that all seem to be missing some important aspect to get a basic simple details panel customisation plugin up and running. Not too bad, I can never the less use what I can to at least get an inferior plugin interface up and running, but have one annoying aspect.
As in a previous question I posted
I asked about how to get a slate widget called SObjectPropertyEntryBox to display the selected static mesh name in the provided dropdown button
the widget appears as this.
and my latest code attempt snippet
+SOverlay::Slot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Top)
.Padding(FMargin(0,90,0,0))
[
SNew(SObjectPropertyEntryBox)
.OnObjectChanged(this, &object_iteration_panel_toolkit::on_static_mesh_changed)
.AllowedClass(UStaticMesh::StaticClass())
.DisplayThumbnail(true)
.DisplayUseSelected(true)
.DisplayBrowse(true)
.EnableContentPicker(true)
.DisplayCompactSize(false)
.AllowClear(true)
]
void on_static_mesh_changed(const FAssetData &static_mesh){
static_mesh_fullname = static_mesh.GetFullName();
}
I thought it would be inbuilt into this widget that once a selection was made, the selected static mesh name would be reflected by updating the text in the drop down combo button. But it is not, even though the selected mesh information does get passed to the binding function on_static_mesh_changed where I can assign and use it.
Does anyone know if I am missing something in the on_static_mesh_changed function that needs to be there like a hidden variable that needs to be reassigned or updated for the selected static mesh to be reflected in the widget button. Or is this how this is supposed to behave? There are no examples or documentation I can find in using this slate widget, and I only came across this by accident.
This is quite important if nothing other than confirming that a static mesh has been selected to be used.
Much appreciate any help in advance.