Hello fellow developers! I’m learning CommonUI i Enchanced Input System to build a menu system that can be easely operated via keyboard and mouse, and gamepad. So far so good, but I have stuck on issue with nature of Common Bound Action Input and Action Bar.
I have created a Bottom HorizontalBox in which I have put BoundActions (SaveSlot, Load Slot, DeleteSlot) and ActionBar.
After I push Save Menu to stack I call function sending ‘name’ variable of Tab ID (I use this Interface in option screens that contain Tab List or submenus) to setup Title and Mapping Context for this menu screen:
When i run the game on gamepad it works perfect. Action bar shows only those bound actions that I have in added Mapping Context (SaveMenu or LoadMenu) and Back Handler Button.
So, when you create your UI, you should remove the IMC_Default and add the new one in this case, IMC_MenuLoad.
Then, when switching to the save menu (SaveGame), which uses a different IMC, make sure to remove the previous one before adding the new one, otherwise both IMCs will remain active and the inputs might overlap.
In my project I have 2 IMCs 1. Fpp_Gameplay and 2. Fpp_Menu. Player Character calls Player Controller to add Gameplay Mapping, then Player Controller through PauseGame event sets Menu or Gameplay Mapping dependent on state.
I remind that on gamepad those Actions are hidden as should be, but when Keybord is Active the Action Text shows up, yet Action Icon is hidden as should be. Look, when I have Load Menu open “Save Slot” has no icon, but Text, and ‘Load Slot’ Action has both. I switched to Gamepad and “Save Slot” Action dissapeared.
Seeing that removing and re-adding the IMC doesn’t solve the issue, from what I can tell in your setup you’re missing a Data Table, an InputData Blueprint, among other things, and need to enable some options in the Project Settings.
Here are some videos that explain very well how to properly configure the Common UI plugin so it works as intended.
I’m also sharing the official documentation, which covers the same setup steps I mentioned above and includes a section about CommonBoundActionBar that might be useful to you.
Common UI
Common UI Quickstart Guide
Common Bound Action Bar
Hope it helps! Let me know if you managed to fix it!