Hello,
When I include and use MeshBasicEditFunctions.h in my header file, it will not compile and instead give the error C4430 on lines 22, 78, 91 and 93. When searching in the source it gives : GENERATED_BODY()
, GENERATED_BODY()
, class GEOMETRYSCRIPTINGCORE_API UGeometryScriptLibrary_MeshBasicEditFunctions : public UBlueprintFunctionLibrary
and GENERATED_BODY()
. I don’t what to do, it worked before but at sometime it stop working…
Hi @pastalapate,
Bit hard to tell without seeing your code but could you check the following:
- Do you have the
#include "YourHeaderFile.generated.h"
in your header file? - Do you have
GENERATED_BODY()
in your class? - You could also try Regenerate Project Files or do a Clean and Rebuild
1 Like
Here is my header and I have already tried to delete Intermediate, Binaries, and Saved to fully regenerate the project
#include "CoreMinimal.h"
#include "DynamicMesh/DynamicMesh3.h"
#include "Components/DynamicMeshComponent.h"
#include "GeometryScript/MeshBooleanFunctions.h"
#include "GeometryScript/MeshPrimitiveFunctions.h"
#include "GeometryScript/MeshSpatialFunctions.h"
#include "GeometryScript/MeshAssetFunctions.h"
#include "GeometryScript/MeshNormalsFunctions.h"
#include "GeometryScript/MeshTransformFunctions.h"
#include "DynamicMeshActor.h"
#include "WE_DMGrass.generated.h"
/**
*
*/
UCLASS()
class WORDENGINE_API AWE_DMGrass : public ADynamicMeshActor
{
GENERATED_BODY()
public:
UFUNCTION(CallInEditor, BlueprintCallable)
void GenerateGrassMesh();
UFUNCTION(CallInEditor, BlueprintCallable)
void ClearGrass();
UFUNCTION(CallInEditor, BlueprintCallable)
void GenerateAsyncGrassMesh();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Grass")
UMaterialInterface* GrassMaterial;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Grass")
float GrassDensity = 250.f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Grass")
float TileSize = 5000.f;
TArray<FVector> Vertices;
TArray<FVector2D> UVs;
TArray<FIntVector> Triangles;
};
class FAsyncDMGrassGenerator : public FNonAbandonableTask
{
public:
FAsyncDMGrassGenerator(AWE_DMGrass* InGrass) : Grass(InGrass)
{
};
FORCEINLINE TStatId GetStatId() const
{
RETURN_QUICK_DECLARE_CYCLE_STAT(FAsyncDMGrassGenerator, STATGROUP_ThreadPoolAsyncTasks)
}
void DoWork();
private:
AWE_DMGrass* Grass;
};
And my start of the cpp file:
#include "WE_DMGrass.h"
#include "GeometryScript/GeometryScriptTypes.h"
#include "GeometryScript/MeshBasicEditFunctions.h"