I’m developing a plugin and used the Unreal Engine wizard to create a base plugin. Now I want to use SAssetDropTarget and using the base plugin supplied by the wizard I did this:
Note: all the code is from the base plugin created by the unreal wizard EXCEPT the BOLD code
SAssignNew(ToolkitWidget, SBorder)
.HAlign(HAlign_Center)
.Padding(25)
.IsEnabled_Static(&Locals::IsWidgetEnabled)
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
.HAlign(HAlign_Center)
.Padding(50)
SNew(STextBlock)
.AutoWrapText(true)
.Text(LOCTEXT("HelperLabel", "Select some actors and move them around using buttons below"))
]
+ SVerticalBox::Slot()
.HAlign(HAlign_Center)
.AutoHeight()
** SNew(SAssetDropTarget)
.OnIsAssetAcceptableForDrop(SAssetDropTarget::FIsAssetAcceptableForDrop::CreateLambda(
](const UObject* InObject) {
return true; // Trying..
//return InObject && InObject->IsA< UStaticMesh >();
}))
.OnAssetDropped(SAssetDropTarget::FOnAssetDropped::CreateLambda(
](UObject* InObject) {
}))**
.....
]
I can’t see it in the editor… What am I missing here?
Thank you!