# Cannot include ProceduralMeshComponent.h

**URL:** <https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, Components, question\
**Created:** [April 8, 2022, 6:34pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721 "2022-04-08T18:34:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thoomas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoomas](https://forums.unrealengine.com/u/Thoomas)\
**Post date:** [April 8, 2022, 6:34pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/1 "2022-04-08T18:34:47Z")

</div>

Since UE5.0 released, I haven’t been able to include/use UProceduralMeshComponent at all. Has the include directory changed? I can’t find a solution anywhere and I’ve tried restarting my project many times. I also checked if the procedural mesh plugin is still there and it is. If anyone could help that would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 8, 2022, 11:07pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/2 "2022-04-08T23:07:25Z")

</div>

UE5 documentation says:

```auto
#include "ProceduralMeshComponent.h"

```

Requiring module [ProceduralMeshComponent](https://docs.unrealengine.com/5.0/en-US/API/Plugins/ProceduralMeshComponent/)

Reference:

> **[UProceduralMeshComponent](https://docs.unrealengine.com/5.0/en-US/API/Plugins/ProceduralMeshComponent/UProceduralMeshComponent/)**
>
> Component that allows you to specify custom triangle mesh geometry Beware! This feature is experimental and may be substantially changed in future releases.

---

<div class="post-metadata">

**Author:** ![Thoomas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoomas](https://forums.unrealengine.com/u/Thoomas)\
**Post date:** [April 8, 2022, 11:29pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/3 "2022-04-08T23:29:14Z")

</div>

As I said in the post, I included ProceduralMeshComponent.h but it doesn’t compile at all, saying it cannot find the file.

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 8, 2022, 11:39pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/4 "2022-04-08T23:39:58Z")

</div>

> [@Thoomas](#):
>
> Has the include directory changed?

I just checked, the directory of the header file is correct in UE5.0 , nothing odd there.

- here are some suggestions  
[C++ Compile can't find #include files - #4 by anonymous\_user\_5b0c6e9e](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/4)  
[How to include the header file from a plugin](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341)

---

<div class="post-metadata">

**Author:** ![Kontur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kontur](https://forums.unrealengine.com/u/Kontur)\
**Post date:** [April 9, 2022, 1:06am UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/5 "2022-04-09T01:06:08Z")

</div>

Do you have “ProceduralMeshComponent” added to the ‘PublicDependencyModuleNames’ in your ‘ProjectName.Build.cs’?

---

<div class="post-metadata">

**Author:** ![Thoomas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoomas](https://forums.unrealengine.com/u/Thoomas)\
**Post date:** [April 9, 2022, 2:30am UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/6 "2022-04-09T02:30:27Z")

</div>

Thank you both for the suggestions. Adding ProceduralMeshComponent to PublicDependencyModuleNames solved my issue!

---

<div class="post-metadata">

**Author:** ![Gelmir\_Telperien](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gelmir_telperien/32/752351_2.png) [@Gelmir\_Telperien](https://forums.unrealengine.com/u/Gelmir_Telperien)\
**Post date:** [December 13, 2023, 10:02pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/7 "2023-12-13T22:02:44Z")

</div>

How do I add it to the PublicDependencyModuleNames?

---

<div class="post-metadata">

**Author:** ![lissity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lissity](https://forums.unrealengine.com/u/lissity)\
**Post date:** [April 4, 2024, 3:35pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/8 "2024-04-04T15:35:52Z")

</div>

I had a problem where adding “ProceduralMeshComponent” to PublicDependencyModuleNames in Build.cs wouldn’t fix the issue and I still couldn’t include ProceduralMeshComponent.h.

It seems regenerating the Visual Studio project files (by right-clicking the .uproject file and selecting ‘Generate Visual Studio Project Files’) fixed the problem. After regeneration, ProceduralMeshComponent.h could be found, and everything compiled. Maybe it didn’t pick up my addition in Build.cs before? No idea.

Posting this in case anyone else encounters the same situation.

---

<div class="post-metadata">

**Author:** ![Michael\_page](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/michael_page/32/911378_2.png) [@Michael\_page](https://forums.unrealengine.com/u/Michael_page)\
**Post date:** [May 5, 2024, 10:48pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/9 "2024-05-05T22:48:23Z")

</div>

I had the same problem. Thank you for the solution!

---

<div class="post-metadata">

**Author:** ![insonifi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@insonifi](https://forums.unrealengine.com/u/insonifi)\
**Post date:** [November 7, 2024, 11:51am UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/10 "2024-11-07T11:51:10Z")

</div>

Thanks, helped me too.

---

<div class="post-metadata">

**Author:** ![huiyao8761380](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@huiyao8761380](https://forums.unrealengine.com/u/huiyao8761380)\
**Post date:** [February 28, 2025, 3:49pm UTC](https://forums.unrealengine.com/t/cannot-include-proceduralmeshcomponent-h/520721/11 "2025-02-28T15:49:27Z")

</div>

MY UE5.5  
`#include "../Plugins/Runtime/ProceduralMeshComponent/Source/ProceduralMeshComponent/Public/ProceduralMeshComponent.h"`

PublicDependencyModuleNames.AddRange “ProceduralMeshComponent”
