According to the image above, the editor is using an SAssetDropTarget widget.
This is what I need in my plugin… But I can’t seem to figure out the correct arguments required in order to instantiate one:
I’ve been sifting through the engine source trying to find any occurrences where an SAssetDropTarget (or even just an SDropTarget) is created, but I can’t seem to find enough information.
Does anyone know the proper way to construct one of these widgets?
I never solved this directly, and I can’t remember the specifics…
But I think I came up with a workaround which allowed me to grab thumbnails using the asset registry.
And then I simply made my own dropdown using FARFilters & slate code.
It was pretty involving, so I’m not even sure if it was the proper route to go.
I’m having the exact same issue here! Needing this functionality for a plugin but just can’t get it to work.
In the engine there are a couple of places that use SAssetDropTarget but using those as an example doesn’t help. It’s the exact same thing in my code but somehow it won’t recognize/compile it.
Would be great if someone from Epic could take a look at this and give us some clarification on how to set it up.
I was trying also to make a sort of dataasset initializer in slate and I want to be able to drop a data asset in the editor.
I followed your example withouth great success. Could you tell me if you included some something aside from the EditorWidgets module in the .cs file or why it might not properly work for me with the given code put inside a simple + SVerticalBox::Slot() ?
So are you getting a compiler error, or does it just not react if you drag and drop something?
If you are getting an error, could you post it? That might help in finding out if you are missing an include.
I think you have all the includes that you need. The “Error List” is often misleading. Could you have a look at the “Output” window in Visual Studio and post the error that you get there?
You should add something to the content of the SDropTarget. I have an STreeView in my DropTarget, but I think you can put any widget there. This will enable you to drag and drop onto the widgets in the Content:
It would help a lot if you could post the error/s that you get in the Output Window of Visual Studio. From the Error List it is hard to say what is wrong.
I tryed playing around with the dependencies and figuring this out. My logic is : Since SDropTarget is from EditorWidget we should include it in the public dependencies. Did this and I am still encountering some difficulties.