Mouse Cursor not changing until moved

firstly, thanks all of you, Same thing still occurs in UE5.0

I’ve struggled to find this post and tried some solution.

Issue

Trying to find a way to set a mouse cursor of a controller,
but the cursor does not change even when the CurrentMouseCursor’s value is changed correctly.(Need a click or some event to make the cursor change in the viewport…)

What I found

  1. There are some other post saying about this(pls refer to Reference)
  2. Happens to find that UWidgetBlueprintLibrary has a function does the exactly same thing.(Which can be called from BP&&Cpp without additional dependency)

Reference

  1. void UWidgetBlueprintLibrary::SetFocusToGameViewport() { FSlateApplication::Get().SetAllUserFocusToGameViewport(); }
  2. setting CurrentMouseCursor only works after a mouse click