Issue 1 solution:
Custom BP node created in C++ (PlayerController class)
.h
UFUNCTION(BlueprintCallable, Category = "Input")
bool IsMouseOnWidget() const;
.cpp
bool ACOMGamePlayerController::IsMouseOnWidget() const
{
for (TObjectIterator<UWidget> WidgetItr; WidgetItr; ++WidgetItr)
{
if(WidgetItr->IsHovered())
{
return true;
}
}
return false;
}
Issue 2 solution:
You need to set every UMG widget to bFocusable = false in properties of widget, don’t forget to set it for root too! Best way to debug focus is enabling visual rectangle in Project Settings > User Interface.