
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
3-1강 18분에서 PlayerBase 작업이 끝나고 컴파일 한 후에 캡처와 같은 rebuild 이슈가 발생합니다.
rebuild를 하든 안하든 언리얼 에디터를 열 수 없습니다.

Yes를 선택하면 그대로 프로젝트 종료
No를 선택하면 아래와 같은 창 추가 노출

Yes를 선택하면 아래와 같은 창 발생

No를 선택하면 프로젝트 종료
작성한 코드 및 에러 메세지
<<<<<<<<<PlayerBase.h 코드>>>>>>>>>>
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "CharacterBase.h"
#include "PlayerBase.generated.h"
class UInputAction;
struct FInfutActionValue;
UCLASS()
class BASIS_API APlayerBase : public ACharacterBase
{
GENERATED_BODY()
public:
APlayerBase();
virtual void BeginPlay() override;
virtual void SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) override;
virtual void Hit(int32 Damage, AActor* ByWho) override;
virtual void IncreaseKillCount() override;
virtual void Attack() override;
private:
UPROPERTY(VisibleAnywhere)
// TObjectPtr<class USpringArmCompnent> CameraBoom;
USpringArmComponent* CameraBoom;
UPROPERTY(VisibleAnywhere)
//TObjectPtr<class UCameraCompnent> FollowCamera;
UCameraComponent* FollowCamera;
UPROPERTY(EditAnywhere)
//TObjectPtr<UInputAction> MoveAction;
UInputAction* MoveAction;
UPROPERTY(EditAnywhere)
//TObjectPtr<UInputAction> ZoomAction;
UInputAction* ZoomAction;
UPROPERTY(EditAnywhere)
//TObjectPtr<UInputAction> LookAction;
UInputAction* LookAction;
UPROPERTY(EditAnywhere)
//TObjectPtr<UInputAction> FireAction;
UInputAction* FireAction;
void Move(const FInputActionValue& Value);
void Look(const FInputActionValue& Value);
void Fire(const FInputActionValue& Value);
void Zoom(const FInputActionValue& Value);
};
<<<<<<<<<PlayerBase.cpp 코드>>>>>>>>>>
// Fill out your copyright notice in the Description page of Project Settings.
#include "PlayerBase.h"
#include "GameFramework/SpringArmComponent.h"
#include "Camera/CameraComponent.h"
#include "EnhancedInputComponent.h"
APlayerBase::APlayerBase()
{
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
CameraBoom->SetupAttachment(RootComponent);
FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));
FollowCamera->SetupAttachment(CameraBoom);
}
void APlayerBase::BeginPlay()
{
Super::BeginPlay();
}
void APlayerBase::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
if(UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(PlayerInputComponent))
{
EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &APlayerBase::Move);
EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &APlayerBase::Look);
EnhancedInputComponent->BindAction(FireAction, ETriggerEvent::Started, this, &APlayerBase::Fire);
EnhancedInputComponent->BindAction(ZoomAction, ETriggerEvent::Triggered, this, &APlayerBase::Zoom);
}
}
void APlayerBase::Hit(int32 Damage, AActor* ByWho)
{
Super::Hit(Damage, ByWho);
if (CurrentHP > 0)
{
return;
}
Destroy();
}
void APlayerBase::IncreaseKillCount()
{
Super::IncreaseKillCount();
}
void APlayerBase::Attack()
{
Super::Attack();
//ToDo: 무기가 완성된 후 작성할 것.
}
void APlayerBase::Move(const FInputActionValue& Value)
{
FVector2D MovementVector = Value.Get<FVector2D>();
if (Controller != nullptr)
{
AddMovementInput(GetActorForwardVector(), MovementVector.Y);
AddMovementInput(GetActorRightVector(), MovementVector.X);
}
}
void APlayerBase::Look(const FInputActionValue& Value)
{
FVector2D LookAxisVector = Value.Get<FVector2D>();
if (Controller != nullptr)
{
AddControllerYawInput(LookAxisVector.X);
AddControllerPitchInput(LookAxisVector.Y);
}
}
void APlayerBase::Fire(const FInputActionValue& Value)
{
//ToDo: 무기가 완성된 후 작성할 것.
}
void APlayerBase::Zoom(const FInputActionValue& Value)
{
if (!IsValid(CameraBoom))
{
return;
}
if (Value.Get<bool>())
{
CameraBoom->TargetArmLength = 40;
CameraBoom->SocketOffset = FVector(0, 40, 60);
}
else
{
CameraBoom->TargetArmLength = 120;
CameraBoom->SocketOffset = FVector(0, 60, 60);
}
}
