Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Snowbird on April 03, 2023, 12:35:05 PM
-
When you talk to an NPC in my game, or open a menu, a new UI window opens up with different options: I want to allow the player to scroll up / down to select an option.
The problem is that when a menu is opened up, nothing is selected, so it won't let a player scroll through the various buttons. Moving the control stick doesn't auto select a button either. I can select a button with the mouse and THEN the controller / keyboard will work. If I can have a button auto-selected already when the menu opens, this will solve the problem for me. Any ideas or how to do this with playmaker?
-
I ended up using the invoke method action with this:
Button button;
void Select_Button()
{
button = GetComponent<Button>();
button.Select();
}
Just copied this from something on the Unity forums. Works for me.
-
Hi.
There is an action for it :)
"Ui Set Selected Game Object"