Forum rules - please read before posting.

Problem with Unity UI menus

I'm having a hard time getting mouse clicks working on Unity UI menus. They work when I don't have my custom event system linked as the prefab in menu manager, but then I don't have my other custom inputs working.

Comments

  • edited August 8

    After installation of the Input System integration, the ControlsReader asset should have its various UI-related input (Point / Click etc) in a UI Action Map. Did you move these into Player, or create your own? It'd be worth checking if the default ControlsReader asset has this issue.

    What is your Project Settings' "Active Input Handling" set to?

    If no Event System prefab is assigned at the top of the Menu Manager, a default Event System will be spawned instead - unless there's already one in the scene.

    If you don't use the custom prefab shown above, what is the state of the Event System that ends up being used?

  • I moved the UI related input to see if that would affect anything.

    Active Input Handling is set to "both"

    This is the default event system that spawns:

  • The default works because of the Both setting - so the inputs from Input Manager are being recognised.

    Take a backup, and re-install the Input System integration from the New Game Wizard, so that it's the one included with AC itself. Keep the old Controls asset to transfer your custom inputs over from, but check that the new asset / prefab works with Menus first.

  • It seems like my Controls asset had lost all bindings in the UI action maps, resulting in it not working. Reinstalling the integration helped me figure this out.

    Also related to inputs, I'm unable to rebind mouse buttons at all. How could this be fixed?

  • edited August 10

    I'll need as much detail as you can share. What inputs specificially are you remapping, what are you attempting to rebind them to, and have you added them to the Inputs UI prefab's Input Remapper component Inspector?

  • By default my attack key is mouse left click, and magic is right click. If I add these to the remapper component I can remap them, but only to keyboard buttons, and I'm unable to rebind them to the mouse buttons.

  • I also noticed that the defaults button broke at some point, I'm unsure how to get it working again. Also, it seems like the downloads button under resources in the about window of AC takes to the scripting api currently.

  • I'm unable to rebind them to the mouse buttons.

    Open up AC's RemappableAction script (from the Template you're using, not the Downloads variant), and remove the line:

    .WithControlsExcluding ("Mouse")
    

    Does that resolve it?

    I also noticed that the defaults button broke at some point, I'm unsure how to get it working again.

    I don't have enough to go on, here. If re-installing the template gives you control back, best to copy/paste your custom inputs to the new one. We can revisit this if the issue occurs again.

    Also, it seems like the downloads button under resources in the about window of AC takes to the scripting api currently.

    Good spot, thanks. I'll see this gets amended.

  • Does that resolve it?

    That seems to work, yes.

    I don't have enough to go on, here. If re-installing the template gives you control back, best to copy/paste your custom inputs to the new one. We can revisit this if the issue occurs again.

    I figured it out, just the button's on click action was missing, probably due to changing the scripts from the download variant to the template.

    Another thing that came to mind, it would be great if the remapper could warn the player, or swap around the keys if two inputs are given the same key.

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.