#Check what input method a UI button was pressed with (controller, keyboard, mouse click or tap)
1 messages · Page 1 of 1 (latest)
Might be an asset pack out there that could do it for you
I've had to make separate Input Actions for different input types and handle them slightly differently
didnt find any when searching sadly
I made one for finger tap touch inputs and a separate one for mouse clicks
im considering just checking for if the button is the eventsystem selected object when a button is pressed
not sure if its already deselected by then though
gonna try that when i get home in a few mins
im not using the new input system
oh
you'd think that'd be simple in one of the world's most popular cross-platform game engines
i may have thought of a solution
ill store the previous EventSystem selected object every frame first
and then, if the eventsystem previous selected object gets pressed, i know it was pressed with navigation
ive created an unreliable solution
with what i described
it works but very badly
:/
gonna keep trying
ok my solution is too unreliable, instead imma just scrap the idea and check if a controller is connected
if people are pressing buttons with a keyboard, controls will be different and players will press a number to choose a slot to move to