Hi. I wonder if there are any possibilities to create a custom drag&drop operation for my custom asset. I checked
FLevelEditorViewportClient::DropObjectsAtCoordinates
but there is only some hardcoded customizations here.
const bool bCanApplyToComponent = AttemptApplyObjToComponent(DroppedObjects[0], TargetComponent, TargetMaterialSlot, true);
if (bOnlyDropOnTarget || !bDropOntoSelectedActors || !bCanApplyToComponent)
{
if (bCanApplyToComponent)
{
const bool bIsTestAttempt = bCreateDropPreview;
bResult = AttemptApplyObjToComponent(DroppedObjects[0], TargetComponent, TargetMaterialSlot, bIsTestAttempt);
}
else
{
// Couldn't apply to a component, so try dropping the objects on the hit actor
bResult = DropObjectsOnActor(Cursor, DroppedObjects, TargetActor, TargetMaterialSlot, ObjectFlags, OutNewActors, bCreateDropPreview, SelectActors, FactoryToUse);
}
}
Thee is AttemptApplyObjToComponent called twice looking for possibility to apply the dragged asset to a scene actor, but inside this function I found only cases for material and animations. Actually I need to apply my asset to static and skeletal meshes as editor does with materials.