New answers tagged

1

I found a solution. I don't think it would be the best but it works for now. With the new input system I subscribe A function (OnTransferKey) to a Key Press void OnEnable() { uI_Manager.uIInputManager.Inventory.OnTransfer.performed += OnTransferKey; } void OnDisable() { uI_Manager.uIInputManager.Inventory.OnTransfer.performed -= OnTransferKey; } ...


0

All you're wanting to do here is: check if the user has just pushed the tab key find what they're selecting (and its index in the list) select the next thing in the list, or wrap around to the beginning So: public Selectable[] UISelectables; private EventSystem eventSystem; private void Start() { eventSystem = FindObjectOfType<EventSystem>(); } ...


0

I don't know much about the New Unity Input System, but you don't need colliders on your UI objects to raycast them, you just need a Graphic Raycaster component on the canvas, then make sure that the things you want to raycast have the "Raycast Target" box checked like so: And then the scripting info you need is here in Unity's docs. That should ...


1

Partial answer from what I figured out yesterday... I was initially testing with a DS4 (official PS4 controller) and it was not working. The unaltered example did work when I switched to an "Afterglow" XBox controller though. I had wrongly assumed SDL was used for input in the example. I edited the example to switch to SDL by changing ...


0

In the end I solved the problem by switching to the new Input System: I created a dedicated action map for the UI menus (the 'pauseMap') and one for the player control 'playerMap', Whenever I press the start button from the 'playerMap', it activates the menu and now the gamepad buttons are used to move through the menu and press buttons (then each button do ...


Top 50 recent answers are included