Error Messages
Severity Code Description Project File Line Suppression State
Error C2248 'ACharacter::Mesh': cannot access private member declared in class 'ACharacter' Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 13
Error C2248 'ACharacter::Mesh': cannot access private member declared in class 'ACharacter' Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 16
Error C2065 'Effect': undeclared identifier Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 24
Error C2065 'RateOfFire': undeclared identifier Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 26
Error C2065 'Scene': undeclared identifier Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 12
Error C2065 'Scene': undeclared identifier Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 15
Error C2065 'Scene': undeclared identifier Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 16
Error C3861 'SetBullet': identifier not found Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 18
Error C2059 syntax error: ';' Escaper D:\Unreal Project\Escaper\Source\Escaper\Weapon.cpp 10
Error MSB3073 The command "D:\UE_4.25\Engine\Build\BatchFiles\Rebuild.bat EscaperEditor Win64 Development -Project="D:\Unreal Project\Escaper\Escaper.uproject" -WaitMutex -FromMsBuild" exited with code -1. Escaper C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets 54
Weapon.h
UCLASS()
class ESCAPER_API AWeapon : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AWeapon();
protected:
UPROPERTY(Category = Scene, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
FString WeaponName;
UPROPERTY(Category = Scene, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
USceneComponent* Scene;
UPROPERTY(Category=Mesh, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
USkeletalMeshComponent* Mesh;
UPROPERTY(Category = Bullet, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
TSubclassOf<ABullet> BulletClass;
UPROPERTY(Category = Niagara, VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
UNiagaraSystem* Effect;
UPROPERTY(Category = Fire, EditAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"))
float RateOfFire;
//....................................
Weapon.cpp
AWeapon::AWeapon()
{
//PrimaryActorTick.bCanEverTick = true;
Scene = CreateDefaultSubobject<USceneComponent>(TEXT("Scene"));
Mesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Mesh"));
SetRootComponent(Scene);
Mesh->SetupAttachment(Scene);
SetBullet(30, 180);
static ConstructorHelpers::FObjectFinder<UNiagaraSystem> EffectAsset(TEXT("NiagaraSystem'/Game/sA_ShootingVfxPack/FX/NiagaraSystems/NS_AR_Muzzleflash_1_ONCE.NS_AR_Muzzleflash_1_ONCE'"));
if (EffectAsset.Succeeded())
Effect = EffectAsset.Object;
RateOfFire = 0.f;
}
It worked fine until yesterday and I didn’t change any part of weapon class. but today my build totally failed. Even ue4 can’t find Basic class(ACharacter)…
I tried deleting (.vs, binaries, derivedDataCache, Intermediate, Saved) directories but it worked not.