0
Planned

Can't use gamepad on inventory/menu screen without clicking a button first using mouse

Evelas 3 months ago in Inventory updated by Marti (Lead Developer) 3 months ago 1

Hi!

I have been trying for days to make it so that when I press "options" and my menu/inventory screen pops up I can auto-highlight/select a button in my inventory and navigate it from there. I have tried to search in here, watched a million youtube videos but I can't find a solution that works for me. I am not good with programming so I can't write scripts.


I am using a Dual Shock 4 controller with a wireless usb dongle to play test and all has been working flawlessly except this part. All my actions works just fine, both the default ones and the ones I have made myself. I have even tried buying an asset that would allow me to use my left stick as a cursor but it doesn't work in any of my game creator scenes, only scenes I don't have game creator active in. It also gave me an error about the event system which leads me to believe it has something to do with GC's event system that starts during play.


If I use my mouse and left click on a interactable button in the menu/inventory and then proceed to use L3 to navigate it works again - but I just want it to auto-select a button every time I press the menu button so I don't have to be dependant on a mouse for menu/ui stuff. I have tried checking navigation as explicit/automatic etc but it doesn't change a thing. Is there a solution for this that I'm just not good enough to see? If so I would be tremendously grateful for any kind of help on the subject.


Thanks a lot in advance,

E

Unity version:
2019.4.2f1
Game Creator version:
1.1.9
Planned

This is something that will be addressed in the next update. In order for the gamepad to pick the controls, it first needs to "focus" on the canvas element at hand (inventory, quests, etc...). 

In the next update, I'm looking into introducing a new Action called "Focus UI Element" that, used along with the Inventory UI action, will allow to focus on that canvas so that the controller knows where the focus should be on.