anybody using common ui in 427 and have the back handler action working correctly?
i cant get it to register. I’ve followed both the two hour livestream and the docs quick start guide - gone over everything to see if i missed any steps and can’t find anything wrong.
I dont have to add input action/axis in project settings > input, right? That is all handled in the CommonInputActionDataBase data table?
Normal navigation is all working as expected. No problem with any communications getting through. Just this OnHandleBackAction function wont fire:
I just read inputs in OnKeyDown and fire off my own event which removes the topmost widget from the stack.
I imagine that is same thing common UI does but I can’t figure out how to actually make it work. There is quite a few things in CommonUI that I can’t get to work as advertised, but in most cases the basic idea wasn’t difficult to reimplement on my own with blueprints.
I’m about to give up my efforts as well and use the same method. The on key down is how I had my menus set up prior to commonUI but I was hoping to get the back handler to work. I can’t seem to get the action bar to work either.
I suppose you have a UI Base widget which contains the stack/s where you push your Common Activatable Widgets to. Is this base widget a Common User Widget or a Common Activatable Widget?
I created the base widget as an Activatable Widget and triggering actions wouldn’t be registered unless auto activate was checked. I have now changed the base widget to inherit from CommonUserWidget instead and this problem seems to be solved!
Hope this helps.
I ran into this issue myself while migrating to common UI. I looked into it and found that the routing never gets set up as the UCommonGameViewportClient constructor for serialization is never called. My solution was to simply add a default constructor that did the exact same thing as the serialization constructor.
I can also confirm @Racso25 solution works out for me/
Base UI Widget is UCommonActivatableWidget
Children stackable widgets are inherited from UCommonActivatableWidget
2 things to do in order for back action to be handled correctly :
=> Set bIsBackHandler = true in the stackable classes
=> Set bAutoActivate = true in my BaseUI UCommonActivatableWidget
None of this works for me. Back handler never gets called no matter what I do. I tried changing the constructor of UCommonGameViewportClient. I tried adding custom CommonUI button widgets with an input action. Nada. Nothing works.
yeah stuff like that is why i usually just build my own systems by default these days. In shorter amount of time i can just make things work exactly how i want and know how it all works, rather than spend a week troubleshooting and then being frustrated and burnt out, and still feeling insecure about a system I don’t fully understand.
of course if they wrote some more comprehensive and accessible documentation…
In addition to what has already been said, in Project Settings, don’t forget to set the Game Viewport Client Class to CommonGameViewportClient (in Engine - General Settings) so the inputs are rerouted to UI.
I can confirm this, currently in 5.3.2 if “Enabled Enhanced Input Support” is enabled, only “Enhanced Input Back Action” works and “Default Back Action” from data table is completely ignored.
I had the same trouble getting the back handler to register. What worked for me was to subclass UCommonGameViewportClient and add the default constructor like @rickard_ap mentioned above. I also noticed they seem to do something similar in Lyra.
Hello everyone !
I’ve made a discover about that issue. I think @rickard_ap solution was a part of the solution for me. It started to work when I implemented an ActionDomainTable on the ComminUI_Settings.
So for those who were still enable to make it work, try that !