Deactivate Player Controller while displaying menu?
Hello and good day!
I have an annoying little problem, and I believe there's a really easy way to fix it. I've created a very simple main menu with UMG containing two buttons: Start Game and Quit Game. Looks like this:
The main menu itself is its own level, and the Start Game button loads the game's first real level, while the Quit Game button simply quits the game. Looks like this in the blueprint graph:
Inside Level Blueprint, it looks like this:
Now, both of these buttons function correctly. The problem is:
1) When playing in editor, if I click outside of the buttons it activates the Player Controller, which means it's suddenly possible to move around in the level while the menu exists - and when this happens it's not possible to get back to the menu to click the buttons.
2) When playing as a standalone game, the menu is visible, but not functioning. Which means I can walk around in the level, but not click the menu buttons.
Therefore, guess I need to know how to deactivate the Player Controller as long as the menu is visible.
asked Dec 05 '14 at 11:02 AM in Blueprint Scripting
You can set the input mode to be game only, UI only, or both. Check out the section, Set Input Mode and Show Cursor in the documentation here:
Hope that helps!
answered Dec 05 '14 at 11:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here