Download

How to use SAssetDropTarget ?? I can't see it in Editor..

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!

Box on AutoHeight() without visual elements inside will end up zero height.

Thank you Bruno Xavier! After your post I found that SAssetDropTarget is not a visual widget (it’s like a invisible box zone… that can be filled with other widgets) >_<
I found SContentReference and this is what I will use.