# Editor Utility Widget- How to detect drag and drop operation in Level Editor Viewport?

**URL:** <https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559>\
**Category:** Editor Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 16, 2026, 6:39pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559 "2026-03-16T18:39:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [March 16, 2026, 6:39pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/1 "2026-03-16T18:39:30Z")

</div>

Hello,

I’m trying to build a tool that displays a large number of items in a List Entry View inside an Editor Utility Widget. I want to be able to drag an item from the list and drop it into the Level Editor Viewport so that the corresponding actor is spawned at the mouse location.

The drag operation is already working, and the spawn logic is implemented as well. But I don’t know how to do the drop operation in the Level Editor Viewport.

For instance, I’ve tried with “on drag cancelled”. But the issue is, obviously, this event can be triggered from anywhere in any viewport or even widget. And the actor would then always be spawned at the same location in the word.

I would love to get some help on the matter.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Vahab](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vahab/32/1148756_2.png) [@Vahab](https://forums.unrealengine.com/u/Vahab)\
**Post date:** [March 18, 2026, 11:48pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/2 "2026-03-18T23:48:54Z")

</div>

The Level Editor viewport does not expose drag-drop events directly to EUW Blueprints. You must handle drag-drop events inside the Level Editor Viewport widget or an editor viewport extension, which requires C++, and also override drag-drop events in the editor viewport widget.

---

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [March 23, 2026, 4:52pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/3 "2026-03-23T16:52:30Z")

</div>

Hello,  
I suspected it was the case indeed. So here I am, trying to learn C++.  
I’m not sure to go far in that process (might be a very advanced stuff to do), but at least I would have tried anyway.

---

<div class="post-metadata">

**Author:** ![Dumple1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dumple1](https://forums.unrealengine.com/u/Dumple1)\
**Post date:** [March 27, 2026, 8:54am UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/4 "2026-03-27T08:54:11Z")

</div>

Take a look at Scriptable Tools. There are quite a lot of interesting features there, and you might find a solution.

---

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [March 27, 2026, 6:35pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/5 "2026-03-27T18:35:08Z")

</div>

I did not know about that! Looks interresting!  
I’ll keep on learning more about C++ while I have some motivation (this is so tedious and cumbersome compared to Blueprint omg) but I’ll keep that in mind.  
Thanks for pointing me this tool out!

---

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [March 28, 2026, 4:51pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/6 "2026-03-28T16:51:42Z")

</div>

Could not resist, and I’ve taken a look at it.  
It looks really good! I might have a single issue; do you know how to call an Editor Utility Blueprint (or an Editor Scriptable) from an Editor Utility Widget?

---

<div class="post-metadata">

**Author:** ![Dumple1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dumple1](https://forums.unrealengine.com/u/Dumple1)\
**Post date:** [April 1, 2026, 8:04am UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/7 "2026-04-01T08:04:54Z")

</div>

Please describe exactly which blueprint you want to call up, send me a picture, and I’ll do my best to help you.

---

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [April 1, 2026, 8:13am UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/8 "2026-04-01T08:13:42Z")

</div>

Hey, that’s very kind of you!  
It happens I managed to find a way to make it work! (basically, select an actor/something from an editor utility widget and then being able to spawn that same actor/something in the world.)

I made a video about it since I found no other ressources talking about it and I figured it could interest some people.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/b/e9baf29ad77f8762e45a3ee2f4cd4bfaa7b24ead.jpeg "Unreal Engine 5 Spawn actor in the world from Editor Utility Widget") ](https://www.youtube.com/watch?v=LMNNe68pBpI)

I could have not figured this out without your help and you mentioning the Scriptable Tools, thanks a lot!

---

<div class="post-metadata">

**Author:** ![Dumple1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dumple1](https://forums.unrealengine.com/u/Dumple1)\
**Post date:** [April 1, 2026, 6:26pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/9 "2026-04-01T18:26:23Z")

</div>

> [@IlliciteS](#):
>

Glad to hear you managed to find a solution! I’ve been struggling with C++ in Unreal on my own for about a year now, and it’s both extremely challenging and really interesting. If you run into any issues, feel free to message me privately—I’ll do my best to help.

---

<div class="post-metadata">

**Author:** ![eliasfrost](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliasfrost/32/1088157_2.png) [@eliasfrost](https://forums.unrealengine.com/u/eliasfrost)\
**Post date:** [August 20, 2026, 8:16am UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/10 "2026-08-20T08:16:46Z")

</div>

I managed to do this in one of my projects. The thing that was the “aha-moment” for me was that you’ll notice that drag-cancelled events are called no matter where the mouse is on the screen, it doesn’t need to be over a widget, unlike the drop-event.

I used this to my advantage and wrote some C++ helper functions to detect if the mouse is inside the editor viewport when the cancellation happened, and spawned an actor at the mouse cursor. The issue though is that it only checks if the cursor is literally within the bounds of the viewport and nothing else. Which means that the drop functionality “goes through” windows that are on top of the viewport. But that’s a shortcoming I’m ok with.

This was the code I came up with to check the mouse cursor:

```cpp
bool UFrameworkEditorSubsystem::IsCursorInsideViewport(UObject* WorldContextObject)
{
    FVector2D TopLeftCoords = GEditor->GetActiveViewport()->ViewportToVirtualDesktopPixel(FVector2D(0,0));
    FVector2D BottomRightCoords = GEditor->GetActiveViewport()->ViewportToVirtualDesktopPixel(FVector2D(1,1));
    
    FVector2D MousePosition = UWidgetLayoutLibrary::GetMousePositionOnViewport(WorldContextObject);
    
    if (MousePosition.X > TopLeftCoords.X && MousePosition.Y > TopLeftCoords.Y)
    {
       if (MousePosition.X < BottomRightCoords.X && MousePosition.Y < BottomRightCoords.Y)
       {
          return true;
       }
    }
    
    return false;
}

```

---

<div class="post-metadata">

**Author:** ![IlliciteS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IlliciteS](https://forums.unrealengine.com/u/IlliciteS)\
**Post date:** [August 23, 2026, 4:44pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/12 "2026-08-23T16:44:28Z")

</div>

It’s good to know it’s possible to do that in C++, but I don’t know anything about it. I don’t think you can do that in BP right now since the properties/functions “getActiveViewport” don’t seem to be exposed in BP.

Thanks for the heads up anyway!

---

<div class="post-metadata">

**Author:** ![eliasfrost](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliasfrost/32/1088157_2.png) [@eliasfrost](https://forums.unrealengine.com/u/eliasfrost)\
**Post date:** [August 28, 2026, 2:05pm UTC](https://forums.unrealengine.com/t/editor-utility-widget-how-to-detect-drag-and-drop-operation-in-level-editor-viewport/2706559/13 "2026-08-28T14:05:19Z")

</div>

Yeah, it’s not possible in blueprints. GEditor is hidden (I think), and by extension all its members. If you decide to go for C++ in the future, know that it’s pretty simple to do.
