problem with mode game and ui

Hi all…
as said in the title when i setted this mode i can move but i can’t move my viewport…only if i move pressing left click of the mouse

This is normal behavior. Once you enable this mode and you activate the mouse + click events, you can only move the camera while holding the left mouse button.
Otherwise your camera would move while you move your mouse in your UI, which would be a bit annoying. The “game” part of “game and ui” is to maintain
the ability to receive button press events.

If you set, for example, enable a menu with ESC and set the Input Mode to UI Only, you can’t press the ESC key again.
So for these things you will want to use Game and UI.

I have a UI question! Why does my mouse cursor disappear if I click somewhere on the screen? For example, If I set UI only to input text for a chat system and I accidentally click off the editable text box, my cursor disappears. Then my game is stuck like that, can press any keys, can do anything.

ehm eXi and if i need to return to the normal mode what i have to use? For example after used the ui mode for the mode how i can return to the normal mode?

I guess you need to make sure that, first, your Cursor is enabled. The PlayerController class has a boolean that is determined to control this. “ShowMouseCursor” or something like that. Just search for Mouse.
Then, second, you may want to have the Canvas in your Chat Widget to block input too. The Canvas is the top most widget in your left Widget hierarchy. If you select it, you can change its visibility at the right details panel.
You would most likely want to set this to “Visible”. Don’t be afraid, visible doesn’t mean you see anything, but it will block the mouse clicks, so you won’t loose focus.

I guess you mean, how to return from UI Only mode to Game Only mode. In the UI mode, you can still use Widgets. This mode is for UIs that overlay the whole screen and are only revoked
by using UMG Buttons. You can use a UMG Widget Button to close the Widget and set the Input Mode back to Game or Game and UI.

thanks for help man :smiley: it works :smiley: