// Copyright Epic Games, Inc. All Rights Reserved. #include "MonolithPlayerController.h" #include "EnhancedInputSubsystems.h" #include "Engine/LocalPlayer.h" void AMonolithPlayerController::BeginPlay() { Super::BeginPlay(); // get the enhanced input subsystem if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem(GetLocalPlayer())) { // add the mapping context so we get controls Subsystem->AddMappingContext(InputMappingContext, 0); } }