Hello everyone, I was trying to create various items (for example, melee weapons, food, a bag, etc.) and ran into an inheritance problem. I created the inherited classes through the Unreal editor, and it looks like this: FDItem.cpp => FDEquipmentItem.cpp => FDBagItem.cpp . I tried to rebuild the project, but still the project loading stops at 75%. By the way, I did not change the child classes, they remained the same as Unreal Engine created them. Please help me understand what I’m doing wrong!
FDItem.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include <Interfaces/FDInteractInterface.h>
#include <Structures/FDInventorySE.h>
#include "FDItem.generated.h"
UCLASS()
class FREEDOM_DOC_API AFDItem : public AActor, public IFDInteractInterface
{
GENERATED_BODY()
public:
AFDItem();
UPROPERTY(EditDefaultsOnly)
FS_FDInventoryItem Content{};
UPROPERTY(EditAnywhere)
UStaticMeshComponent* ItemMesh;
virtual void Interact_Implementation(AActor* Interactor) override;
protected:
virtual void BeginPlay() override;
virtual void OnConstruction(const FTransform& Transform) override;
public:
UPROPERTY()
UDataTable* DataTableItemInfo;
virtual void Tick(float DeltaTime) override;
};
FDEquipmentItem.h
#pragma once
#include "CoreMinimal.h"
#include "Items/FDItem.h"
#include "FDEquipmentItem.generated.h"
/**
*
*/
UCLASS()
class FREEDOM_DOC_API AFDEquipmentItem : public AFDItem
{
GENERATED_BODY()
};
FDBagItem.h
#pragma once
#include "CoreMinimal.h"
#include "Items/FDEquipmentItem.h"
#include "FDBagItem.generated.h"
/**
*
*/
UCLASS()
class FREEDOM_DOC_API AFDBagItem : public AFDEquipmentItem
{
GENERATED_BODY()
};