Hey I have this weird thing here that I cant manage to fix for some reason I have a Struct really Simple one not complex at all:
#pragma once
#include “CoreMinimal.h”
#include “LoadoutStruct.generated.h”
USTRUCT(BlueprintType)
struct FLoadoutPartIcon
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Loadout”)
TSoftObjectPtr WeaponPart;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Loadout")
TSoftObjectPtr<UMaterialInstance> WeaponIcon;
};
for some reason I get this error:
fatal error C1083: Cannot open include file: ‘LoadoutStruct.generated.h’: No such file or directory
I made sure that everything is correct like the names and the generated.h file is there but for some reason I’m still getting this error no matter what I’m doing.
I use UE 5.6.1 Source build.
things I tried so far:
-
Reinstalled UE 5.6.1 and rebuild it.
-
Deleted .vs, Binaries, Intermediate, Saved and .sin folders and files, and rebuild it.
-
changed the location of LoadoutStruct.h and .cpp files.
-
Added the Folder to PublicIncludePaths.AddRange.
-
PublicDependencyModuleNames.AddRange(new string {
“Core”, “CoreOnline”, “CoreUObject”, “Engine”} -
Tried adding a dummy UCLASS below the struct.
UCLASS()
class UDummyClassForTriggeringUHT : public UObject
{
GENERATED_BODY()
};
anyone have any suggestion on how to fix it will be very helpful thanks in advance.