Hi!
In my project I had a blueprint inheriting from AWheeledVehicle, with this class chain:
AWheeledVehicle > BP_Vehicle > BP_Car …
Now I created a new C++ class, named Vehicle, between AWheeledVehicle and BP_Vehicle, having this new chain:
AWheeledVehicle > Vehicle (C++) > BP_Vehicle > BP_Car …
Everyting was working fine. But now I have a very strange and annoying problem: everytime I reload the project the BP_Vehicle’s parent resets to AWheeledVehicle, generating a lot of compilation errors.
If I do a reparenting again on Vehicle everything fixes, but I have to do this every time I launch the project.
Is there something wrong with my C++ class? Or is something related to the AWheeledVehicle class?
Here is the header of my Vehicle class, thanks in advance for any hint you could give me.
#pragma once
#include "CoreMinimal.h"
#include "Glb.h"
#include "WheeledVehicle.h"
#include "Vehicle.generated.h"
UCLASS()
class NEXTDRIVING_API AVehicle : public AWheeledVehicle
{
GENERATED_BODY()
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
AVehicle();
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Camera)
ECameraMode CameraMode;
USkeletalMeshComponent* VehicleMesh;
UCameraComponent* Camera;
TArray<UActorComponent*> SpringArms;
USpringArmComponent* HoodSpringArm;
USpringArmComponent* ChaseSpringArm;
UFUNCTION(BlueprintCallable)
void SetCameraMode(ECameraMode Mode);
UFUNCTION(BlueprintNativeEvent)
void VehicleTestEvent();
void VehicleTestEvent_Implementation();
};