We are setting up our UI to use the Common Bound Action Bar. Generally, this is working as expected. We use Enhanced Input and Common UI, and we use Input Actions to control various actions throughout our UI. The Common Bound Action Bar is correctly identifying active Input Actions that are bound with bDisplayInActionBar set to true.
However, some of our Input Actions trigger only when held for a specified length of time by using InputTriggerHold triggers. Our CommonBoundActionButton implementation uses a CommonActionWidget with a Progress Material Brush and Progress Material Parameter to provide feedback on the hold. From what I can tell looking through the implementation it looks like this is progress indicator is supposed to function like this:
- UCommonBoundActionButton::SetRepresentedAction is called with the UIActionBindingHandle requiring a hold. I see this being called at runtime for an action I am debugging.
- This function binds NativeOnActionProgress to OnHoldActionProgressed. If OnHoldActionProgressed is broadcast, then UCommonButtonBase::NativeOnActionProgress will call UCommonActionWidget::OnActionProgress and the material will update.
- So for this to work it looks like there is an expectation that OnHoldActionProgressed is broadcast.
However, it doesn’t look like this ever gets called due to the following:
- The one spot where OnHoldActionProgressed is called with the hold progress looks to be FUIActionBinding::UpdateHold.
- FUIActionBinding::UpdateHold is only called from FActionRouterBindingCollection::ProcessHoldInput.
- But FActionRouterBindingCollection::ProcessHoldInput will only call UpdateHold if the Binding has HoldMappings.
- HoldMappings are created in the FUIActionBinding constructor, only if Enhanced Input is not enabled. In practice I observe the block with the following comment being hit, which does not create HoldMappings: “Nothing else to do if we have an enhanced input action, the input action itself will be queried against for keys later”.
My question is, how can we use the Common Bound Action Bar with Common Action Widgets that show hold feedback when their associated Input Actions are configured to require holding?