How to show the mouse cursor at runtime in C++?

Your character already has a controller, assuming it was spawned correctly. So you can just use GetController() to get it.



APlayerController* PC = GetController();

if (PC)
{
PC->bShowMouseCursor = true; 
PC->bEnableClickEvents = true; 
PC->bEnableMouseOverEvents = true;
}


1 Like