Hi.
I have a MainMenu level and the main game level. The MainMenu level contains a Start button which opens the main game level.
When I first start playing the game, I am able to interact with the buttons in the MainMenu directly without having to click into the viewport but once my main game level opens, I need to click into the viewport once before any input is accepted.
What do I need to do to fix this?
Thanks!

Can you try this node and see if it fixes the issue, you should only be concerned if this is happening in your packaged build, in editor its fine.
Should I use this node after the BeginPlay node in the main game level BP?
you can use this in your character class, or even HUD class’s begin play. it does not need any sort of player or controller reference.
for complete picture here is how the setup looks in my project, I do this in my Player’s begin play.
1 Like
I’ve implemented it similarly in my character class’s BeginPlay in C++ -
FInputModeGameOnly GameModeOnly;
if (MainPlayerController)
{
MainPlayerController->SetInputMode(GameModeOnly);
}
UWorld* World = GetWorld();
if (World)
{
UGameplayStatics::SetViewportMouseCaptureMode(World, EMouseCaptureMode::CapturePermanently_IncludingInitialMouseDown);
}
This doesn’t seem to work in the editor. I’ll check once after the packaging the project as well
Still doesn’t work. Packaging the game as an APK. But I still need to click into the screen before getting input control
Hmmm, this is working fine in my project, I use this for my lobby/Menu
And the the picture uploaded in earlier post for when the map switches to gameplay arena. I am on 5.1 btw and can you tell me if your packaged game starts in full screen or windowed?
It’s for mobile platforms. It starts in landscape mode and fullscreen
Should I add the node in the level BP for my main game level then?
You can try that as well but I don’t think it will have any different results.
Hmmm weird. Not sure what else I can do then