# C4430 In MeshBasicEditFunctions.h

**URL:** <https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254>\
**Category:** C++\
**Tags:** unreal-engine, compile-error, question, CPP\
**Created:** [May 14, 2025, 5:53pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254 "2025-05-14T17:53:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pastalapate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pastalapate](https://forums.unrealengine.com/u/pastalapate)\
**Post date:** [May 14, 2025, 5:53pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/1 "2025-05-14T17:53:32Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![SylarAtomic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sylaratomic/32/1194543_2.png) [@SylarAtomic](https://forums.unrealengine.com/u/SylarAtomic)\
**Post date:** [May 14, 2025, 9:26pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/2 "2025-05-14T21:26:24Z")

</div>

Hi @pastalapate,

Bit hard to tell without seeing your code but could you check the following:

1. Do you have the `#include "YourHeaderFile.generated.h"` in your header file?
2. Do you have `GENERATED_BODY()` in your class?
3. You could also try **Regenerate Project Files** or do a **Clean and Rebuild**

---

<div class="post-metadata">

**Author:** ![pastalapate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pastalapate](https://forums.unrealengine.com/u/pastalapate)\
**Post date:** [May 15, 2025, 5:30am UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/3 "2025-05-15T05:30:26Z")

</div>

Here is my header and I have already tried to delete Intermediate, Binaries, and Saved to fully regenerate the project 😕

```cpp
#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:

```cpp

#include "WE_DMGrass.h"
#include "GeometryScript/GeometryScriptTypes.h"
#include "GeometryScript/MeshBasicEditFunctions.h"

```

---

<div class="post-metadata">

**Author:** ![SylarAtomic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sylaratomic/32/1194543_2.png) [@SylarAtomic](https://forums.unrealengine.com/u/SylarAtomic)\
**Post date:** [May 15, 2025, 2:34pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/4 "2025-05-15T14:34:35Z")

</div>

Thanks for sharing the code. Sorry for the delay in getting back to you.

You are also missing `#pragma once` at the top of your file.

Have you tried adding the required dependencies in Your Project’s `.Build.cs` File?

Not 100% sure but I would guess you need  
`DynamicMesh, "GeometryCore", "GeometryScriptingCore", "GeometryFramework"`

---

<div class="post-metadata">

**Author:** ![pastalapate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pastalapate](https://forums.unrealengine.com/u/pastalapate)\
**Post date:** [May 15, 2025, 3:53pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/5 "2025-05-15T15:53:23Z")

</div>

Yeah it has `#pragma once` I’ve just not copied it. And my Build.cs looks like this:

```cpp
		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core", "ProceduralMeshComponent", "Foliage", "PhysicsCore",
                    "DynamicMesh", 
					"GeometryCore",
					"DynamicMesh",
					"GeometryCore",
					"GeometryScriptingCore",
					"GeometryFramework",
            }
			);
			
		
		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
				"CoreUObject",
				"Engine",
				"Slate",
				"SlateCore",
				"MeshDescription", "StaticMeshDescription", "AssetRegistry","DynamicMesh"
            }
			);

```

---

<div class="post-metadata">

**Author:** ![SylarAtomic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sylaratomic/32/1194543_2.png) [@SylarAtomic](https://forums.unrealengine.com/u/SylarAtomic)\
**Post date:** [May 15, 2025, 9:59pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/6 "2025-05-15T21:59:52Z")

</div>

Hi @pastalapate,

I took all the code you provided and put it into a new project with Engine version **5.5.4**. Everything complied fine.

I did notice you have `DynamicMesh` and `GeometryCore` twice in your `PublicDependencyModuleNames`.

In your `cpp` file, could you provide me with one of the functions/structs you are using from `MeshBasicEditFunctions`?

Could you double check your `cpp` file that you have all the closing braces? I’ve had it in the past where it all looks fine but causes issues in other files as it has a knock on effect.

Only other thing I could thinking of is running **Generate Project Files** or move some code into a clean project and see if you have similar issues, alternatively you could comment out parts of the code and see which parts cause the errors to start showing.

---

<div class="post-metadata">

**Author:** ![pastalapate](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pastalapate](https://forums.unrealengine.com/u/pastalapate)\
**Post date:** [May 16, 2025, 5:23am UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/7 "2025-05-16T05:23:10Z")

</div>

Hi @SylarAtomic,  
Here it is .

```cpp
void AWE_DMGrass::GenerateGrassMesh()
{
	UDynamicMesh* DynamicMesh = DynamicMeshComponent->GetDynamicMesh();
	DynamicMeshComponent->ConfigureMaterialSet({ GrassMaterial });
	float Gap = TileSize / GrassDensity;
	for (int32 X = 0; X < GrassDensity; X++)
	{
		for (int32 Y = 0; Y < GrassDensity; Y++) {
			FVector Position = FVector(X * Gap, Y * Gap, 0) + GetActorLocation();
			FHitResult HitResult;
			FCollisionQueryParams CollisionParams;
			bool bHit = GetWorld()->LineTraceSingleByChannel(HitResult, Position + FVector(0, 0, 10000), Position + FVector(0, 0, -10000), ECC_Visibility, CollisionParams);
			if (!bHit)
			{
				continue;
			}
			FVector HitLocation = HitResult.Location - GetActorLocation();
			Vertices.Add(HitLocation);
			Vertices.Add(HitLocation + FVector(0, 0, 50));
			Vertices.Add(HitLocation + FVector(0, 5, 0));
			int32 FirstIndex = Vertices.Num() - 3;
			Triangles.Add(FIntVector(FirstIndex, FirstIndex + 1, FirstIndex + 2));
			UVs.Add(FVector2D(0, 0));
			UVs.Add(FVector2D(0.5, 1));
			UVs.Add(FVector2D(1, 0));
		}
	}
	FGeometryScriptSimpleMeshBuffers MeshBuffers = FGeometryScriptSimpleMeshBuffers();
	MeshBuffers.UV0 = UVs;
	MeshBuffers.Triangles = Triangles;
	MeshBuffers.Vertices = Vertices;
	FGeometryScriptIndexList IndexList;
	UGeometryScriptLibrary_MeshBasicEditFunctions::AppendBuffersToMesh(DynamicMesh, MeshBuffers, IndexList);

}

```

I don’t know why it doesn’t work now, it was working fine until at a moment, it failed compiling with the same code that was compiling before I tried generated project files etc 3x and it doesn’t work 😕

---

<div class="post-metadata">

**Author:** ![SylarAtomic](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sylaratomic/32/1194543_2.png) [@SylarAtomic](https://forums.unrealengine.com/u/SylarAtomic)\
**Post date:** [May 16, 2025, 7:59pm UTC](https://forums.unrealengine.com/t/c4430-in-meshbasiceditfunctions-h/2510254/8 "2025-05-16T19:59:05Z")

</div>

Hi @pastalapate

That code works perfectly on my machine 😥

The issue looks to be related to UHT but often the cause is obscure.

I’m guessing you have done all these steps?

1. Close Visual Studio and Unreal Editor
2. Delete these folders: (You mentioned this earlier)

- Intermediate
- Binaries
- Saved

1. Also try removing the .vs/ folder (if it exists)
2. Right-click on your .uproject file and “Generate Visual Studio project files”
3. Open the solution in Visual Studio
4. Rebuild the solution using Clean Solution followed by Build Solution
5. Restart your computer (sometimes this helps with stubborn build issues)
6. Open the project again

Only other things I could think of:

1. Using source control, stash your changes and see if the are any issues.
2. Verify your UE install
3. Make a new test project and try include `MeshBasicEditFunctions.h`
4. Compare your `MeshBasicEditFunctions.h` with the version on Epic Games GitHub for UE

Let me know if you do figure it out!
