Forum rules - please read before posting.

Direct-control menu navigation only works with Gamepad when using Unity UIs as a source

[Unity 2019.4.40f1 - AC 1.75.5 - Rewired 1.1.41.5U2019]

Hi!

Our game gives the option to play either in "point and click" mode and in "direct" mode. As a further bit of context: I recently switched from the new Input System to the "legacy" one, integrating it with Rewired. It was pretty straightforward and I'm able to switch between the two modes quite easily.

You can check my control switching script here.

Still, I've been trying to enable direct control navigation in menus for both gamepad and keyboard keys (e.g. directional arrows), but when working with Menus that have a Unity UI as a source, I have only managed to have the gamepad to be working.

I may be wrong, but I'm confident that the issue doesn't lie in the keyboard keys mapping, nor in the EventSystem, because:

  • I'm able to move the character using the directional keys (bound to the Horizontal and Vertical axes)
  • I created two test UIs (simple menu of 3/4 buttons in a vertical layout)
    • one uses AC as a source, and both the controller and the directional arrow keys work as intended
    • one uses a Unity UI Prefab, and the only thing that works is the controller
    • both pause the gameplay when open.

The Unity UI one does has button Elements, all linked to their respective Constant ID, plus I tried both setting the "Auto-select first visible Element?" tickbox on and tried to manually specify the element name, but the result was the same.

I also tried selecting both Automatic and Vertical navigation for its buttons and setting up the RectTransform boundaries, but still no results.

Here's my EventSystem prefab and Menu settings, for further context.

As always, thanks in advance!

Comments

  • AC doesn't interfere with the navigation of UI canvases - AC-linked or not. Because of this, the Rewired integration script won't be involved either.

    AC's built-in Event System does have its own Optional Mouse Input Module that replaces Unity's Standalone Input Module, but that only deals with enforcing either direct- or mouse-navigation.

    It may be that the issue is to do with the way your inputs/Rewired are set up.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.