Hi!
In Lyra, Enhanced Input bound event handlers (or even old-style key input handlers) in a user widget that is used with the UI Extension system in Lyra will work initially, but then not after changing worlds.
This is due to the input delegates for the user widget being bound in UUserWidget::NativeOnInitialized() to the input component on the owning player controller at that time.
Loading to a new level recreates the player controller and the input component, but does not update these bindings on the cached user widget that will be reused with the invalid bindings.
Caching of widgets at multiple levels ensures that the same user widget is reused and not recreated:
- PrimaryGameLayout is cached by GameUIPolicy
- W_ShooterHUDLayout is cached by CommonActivatableWidgetContainerBase
- UIExtension widgets (e.g. W_Healthbar) are cached by UIExtensionPointWidget/DynamicEntryBoxBase
Many thanks,
Dave