18 lines
512 B
C++
18 lines
512 B
C++
// 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<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer()))
|
|
{
|
|
// add the mapping context so we get controls
|
|
Subsystem->AddMappingContext(InputMappingContext, 0);
|
|
}
|
|
} |