Download

How can I SetKeyboardFocus on a UEditableTextBox at game beginning?

I test and fount that:
UEditableTextBox::SetKeyboardFocus() only works at GameMode::BeginPlay(), but I want a override function in UUserWidget and invoke SetKeyboardFocus() in it, because I want put all UI logic code in UserWidget class.
UUserWidget has no BeginPlaye() function and even I call SetKeyboardFocus in UUserWidget::Initialize() function, it doesn’t work.

Hi! You can try to override those functions:
virtual void NativeConstruct();
virtual void NativeOnFocusLost( const FFocusEvent& InFocusEvent );

thx for your help.
it also doesn’t work.