Files
open-conflict/Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp
Cody Larkin c91d73ed33 Base files added
May have an idea of what caused problem
2025-11-21 23:38:16 -05:00

21 lines
547 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "DDIPlayerController.h"
#include "EnhancedInputSubsystems.h"
#include "Engine/LocalPlayer.h"
#include "InputMappingContext.h"
void ADDIPlayerController::BeginPlay()
{
Super::BeginPlay();
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer()))
{
for (UInputMappingContext* CurrentContext : MappingContexts)
{
Subsystem->AddMappingContext(CurrentContext, 0);
}
}
}