Files
projectlighthouse/Source/ProjectLighthouse/ProjectLighthousePlayerController.cpp
2024-06-02 18:10:57 +02:00

18 lines
530 B
C++

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