but in my test, it has no effect, the umg button is still active for click, why?
what’s the usage of “Set Input Mode Game Only” ?..
Yeah, GameOnly means no UI. That also means that UMG won’t register “OnKeyDown” etc.
Why are you asking? (:
you use “Set Input Mode Game and UI”, it’s the default setting and behaves ok.
but what i said is “Set Input Mode Game Only”, it’s expected UMG shouldn’t handle msg, but it does, so i don’t know why that’s wrong.
yes, it’s expected UMG shouldn’t handle msg, but it does.
so i don’t know why that’s wrong.
A button click is not considered Input. This node should only be about Input.
If you want to disable the Click Events then you should hide the cursor and disable click events (boolean in the PlayerController).
thanks for explain, but i feel confuse about what is “Input”? why click is not a Input…
and if so, what’s the usage of “Set Input Mode Game Only” node ? how does it affect the world?
Already explained that in my first post. UMG Widgets can Override functions for “OnKeyDown” etc.
They probably won’t work if the UI has no Input.
The modes are there to primarily control the effects of the mouse,
UI Only - viewport never sends the input to the player controller / player input system. Also does things like, show the mouse.
Game & UI - Allows hybrid interaction 9/10 this is what you want. This input mode is like WoW, you can interact with UI, but clicking directly on the viewport gives the viewport temporary mouse control, to do things like rotate the camera while the mouse is depressed.
Game Only - Will not actually prevent clicks on the UI, or prevent the UI with focus from getting input. It’s primarily there to hide the mouse, put focus back on the viewport. If the user manually showed the mouse again, they could click the UI and interact with them, only way to prevent that would be to make your UI Hit Test Invisible.
thanks! now i know the function of they three.
but i don’t think the last one’ name exactly shows its function.