I’m trying to package a plugin made in C++ but it is failing for some strange reasons…
The log says:
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(84): error C3861: 'AsyncTask': identifier not found
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(64): error C3861: 'AsyncTask': identifier not found
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(226): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(226): error C3861: 'CreateTransient': identifier not found
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(231): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(232): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(233): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(233): error C2653: 'TextureGroup': is not a class or namespace name
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(233): error C2065: 'TEXTUREGROUP_Pixels2D': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(234): error C2065: 'FTexture2DMipMap': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(234): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(234): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(235): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(235): error C2065: 'LOCK_READ_WRITE': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(237): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(238): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(245): error C2065: 'FTexture2DMipMap': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(245): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(245): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(246): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(246): error C2065: 'LOCK_READ_WRITE': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(248): error C2065: 'Mip': undeclared identifier
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Source\PollutionPlugin\Private\PollutionManager.cpp(249): error C2027: use of undefined type 'UTexture2D'
UATHelper: Package Plugin Task (Windows): C:\Users\theun\Desktop\PollutionPlugin\HostProject\Plugins\PollutionPlugin\Intermediate\Build\Win64\UnrealGame\Inc\PollutionPlugin\UHT\PollutionManager.generated.h(12): note: see declaration of 'UTexture2D'
The reason why this is strange, is because when I build the project from visual studio, it will not fail.
The correct files are included as such:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Runtime/Core/Public/Async/ParallelFor.h"
#include "Components/BoxComponent.h"
#include "Kismet/BlueprintAsyncActionBase.h"
#include "Kismet/GameplayStatics.h"
#include "PollutionManager.generated.h"
I really don’t know how to solve it. It all seems correct to me, so I don’t know what I’m doing wrong…