Skip to content
Snippets Groups Projects

UE5.3-2023.1-rc3

Merged David Gilbert requested to merge dev/5.3 into 5.3
1 file
+ 7
17
Compare changes
  • Side-by-side
  • Inline
@@ -85,31 +85,21 @@ void UIntenSelectComponent::BeginPlay()
@@ -85,31 +85,21 @@ void UIntenSelectComponent::BeginPlay()
void UIntenSelectComponent::InitInputBindings()
void UIntenSelectComponent::InitInputBindings()
{
{
const APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
const APawn* Pawn = Cast<APawn>(GetOwner());
if (!Pawn)
UEnhancedInputLocalPlayerSubsystem* Subsystem =
return;
ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PC->GetLocalPlayer());
UEnhancedInputComponent* EI = Cast<UEnhancedInputComponent>(Pawn->InputComponent);
UInputComponent* PlayerInputComponent = PC->InputComponent;
UEnhancedInputComponent* PEI = Cast<UEnhancedInputComponent>(PlayerInputComponent);
if (!PEI)
if (!EI)
{
{
const FString Message = "Could not get PlayerInputComponent for IntenSelect Input Assignment!";
const FString Message = "Could not get PlayerInputComponent for IntenSelect Input Assignment!";
#if WITH_EDITOR
const FText Title = FText::FromString(FString("ERROR"));
FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title);
#endif
UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
UKismetSystemLibrary::QuitGame(this, nullptr, EQuitPreference::Quit, false);
return;
return;
}
}
// Bind the actions
// Bind the actions
PEI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
EI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
PEI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
EI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
}
}
void UIntenSelectComponent::InitSplineComponent()
void UIntenSelectComponent::InitSplineComponent()
Loading