Spawn Actor on mouse location with editor widget

Greetings to everyone,

I am making a game with maps that use a grid system. I am using an actor and spawn objects in the world. Each object acts as a grid. This will be significant as I can change the map easily if I need.

Because I need to have many objects instead of spawning them manually, I want to make an editor widget that can spawn the objects.

So what I am trying to do is get the mouse location and spawn an object at the mouse location. But the problem is how do I get the mouse location. In normal blueprints ā€œconvert mouse location to world spaceā€ can be used but not in the editor widget. Is there a way to get the mouse location or any other way to spawn the objects?

Thank you

1 Like

Trying to do the same.

Right now I can spawn from the middle of the screen (viewport camera position + forward vector) but I cant do it with the mouse position.