Enhanced Input in PlayerController
Enhanced Input in PlayerControllerJeanGrey
c_cpp
2 years ago
587 B
45
Indexable
// Jeangrey´s c++ code
// Enhanced Input in BlasterPlayerController
// BlasterPlayerController.h
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input)
UInputAction* QuitAction;
// BlasterPlayerController.cpp
void ABlasterPlayerController::SetupInputComponent()
{
Super::SetupInputComponent();
if (InputComponent == nullptr) return;
if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(InputComponent))
{
EnhancedInputComponent->BindAction(QuitAction, ETriggerEvent::Completed, this, &ABlasterPlayerController::ShowRetunToMainMenu);
}
}Editor is loading...