[UMG] How to not hide mouse when click viewport in game?

I want to make UI only game, without 3D camera and so on.

I removed player controller, but when i click outside of gui widgets on viewport, i still getting mouse disappear, and i have to press shift+F1 to enable it again.

What to do?

Because your game is set to hide your mouse cursor. Also you have to have a player controller even if it is a UI only game, because the node “Show mouse Boolean” is for the player controller.

how to fix that?

In your begin play of your controller or in your UMG set this

no, its not working.

its just shows cursor, at the beginnig of the game. When i click viewport - it disappears again.

I even Set Input Mode UI Only - nothing helps.

i’ve added show mouse cursor to Event Tick, and it works like a charm. But is there another method? why do i have to set show mouse cursor every tick?

i donno what happened, but now it also works for Begin Play event. Probably i will never know, some kind of bug.

No problem, yeah that is weird you only have to do it once. It’s a bool so the mouse will stay visible until you set the bool to false.

In case someone stumbles upon this at a later time. There’s two ways to make the mouse be permanently visible and both of them can override each other

First is the bool “Show Mouse Cursor”

And Second is the “Game and UI” Input Mode. For some reason, checking “Hide Cursor During Capture” will HIDE THE CURSOR DURING CAPTURE EVEN WHEN THE INPUT MODE IS CHANGED. And you also can’t reference that specific bool in blueprints either so a hacky way is to set the Input Mode to Game and UI with the “Hide Cursor During Capture” bool unchecked, then changing the Input Mode to your desired input mode. Which is the only way I found to ensure the mouse is not hidden on capture in other Input Modes.

This is on 4.26 btw not sure about earlier versions