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
- There are some other post saying about this(pls refer to Reference)
- Happens to find that UWidgetBlueprintLibrary has a function does the exactly same thing.(Which can be called from BP&&Cpp without additional dependency)
Reference
void UWidgetBlueprintLibrary::SetFocusToGameViewport() { FSlateApplication::Get().SetAllUserFocusToGameViewport(); }
- setting CurrentMouseCursor only works after a mouse click