There seems to have been some breaking changes between 5.4 and 5.5 that impact the Enhanced Input system. In trying to isolate why most of my input logic is not working in 5.5 but worked fine in 5.4, I have worked up a minimal sample that exhibits all of the same behaviors, and here are my findings:
First, if you have Enhanced Input Action events on UI class, create a child class from that, and spawn the child UI into the world, the events will not fire; though they will fire just fine if you spawn the parent.
Second, if you add an enhanced input event to the child class (even one that is unused and not part of any mapping context) then the enhanced input events will fire on the parent, even if you spawn the child. (The unused event does need to be hooked up to some code, like a print statement, even if it will never run)
Third if I remove the UI from the viewport, and then add it back in (the same instance), then all enhanced input events for the UI stop firing, even with the âunrelated event trickâ above.
What changed in 5.5 that could have caused this? These seem like bugs rather than intentional behavior.
In my case, I had an Enhanced Input Event placed in a User Widget and when I compiled and saved that widget I had a log message telling : âbAutomaticallyRegisterInputOnConstructionâ must be true in order to use Enhanced Input in the widgetâŠ
When I removed the Enhanced Input Event from that User Widget, the error disappeared.
So, to fix the problem, I had to put that Enhanced Input Event in my PlayerController to have it working by calling a Custom Event on the User Widget from the Player Controller Input Event.
My theory is that its not properly registering the widget with the enhanced input system if its only input events are inherited. This is why adding a dummy input event in the child fixes the problem.
As a temporary workaround until Epic fixes Enhanced Input in UE 5.5, I am attaching hacky code that makes Enhanced Input work. Implement this class in C++ and then, inherit from HACK_UserWidget rather than UserWidget when creating Blueprint widgets which are supposed to receive Enhanced Input Action events.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "HACK_UserWidget.generated.h"
UCLASS(Abstract, meta = (DisableNativeTick), MinimalAPI)
class UHACK_UserWidget : public UUserWidget
{
GENERATED_BODY()
public:
virtual void NativeOnInitialized() override;
};
so currently i donât think thereâs a way to activate the Automatically register input on construction.
The issue is that unreal 5.5 doesnât allow you to use the enhanced input with Child Widgets, this is, if the widget is inside another widget without being âcreate widgetâ
so my current solution is to go to the âparent Widgetâ and Call the functions inside the child
like this:
As long as you have an Input Action (it doesnât have to be mapped to anything) if you put this event in the child, it allows the parent events to register even on the child.