# Include Plugin in C++

**URL:** <https://forums.unrealengine.com/t/include-plugin-in-c/43020>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [September 27, 2015, 1:07pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020 "2015-09-27T13:07:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_be4897441](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be4897441](https://forums.unrealengine.com/u/anonymous_user_be4897441)\
**Post date:** [September 27, 2015, 1:07pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/1 "2015-09-27T13:07:51Z")

</div>

Dear fellow UE users,

I’m currently working on a project where I need to include a plugin (ProceduralMeshComponent) in C++.

But the complier keeps throwing me errors, that it cannot find UProceduralMeshComponent.

Here is what I did so far to include it :

1. I edited \<ProjectName\>.Build.cs :

Added :

PrivateDependencyModuleNames.AddRange(new string] { “ProceduralMeshComponent” });  
PrivateIncludePathModuleNames.AddRange(new string] { “ProceduralMeshComponent” });

And edited :

1. Also I tried to include the header file itself by following lines (of corse not at the same time):

#include “ProceduralMeshComponent.h”  
#include “Engine/Plugins/Runtime/ProceduralMeshComponent/Source/Public/ProceduralMeshComponent.h”  
#include “…/…/Engine/Plugins/Runtime/ProceduralMeshComponent/Source/Public/ProceduralMeshComponent.h”

The last one does not throw an error itself, but VS still crashes because it cannot find UProceduralMeshComponent when I try to compile.

1. Edited the DefaultEngine.ini for activ Plugins and added there :

[Plugins]  
EnabledPlugins=ProceduralMeshComponent

1. 

Of course I checked the forum for help and best advice was here:

> **[Using a plugin in C++ code](https://forums.unrealengine.com/questions/13691/using-a-plugin-in-c-code.html)**
>
> Hi, I want to use a plugin which is available in the engine source tree. Exactly that is: Engine/Plugins/Runtime/CustomMeshComponent How can I do that? More details: In a fresh project the UCustomMeshComponent class is not visible for the...

Which obviously did not help, because the problem still exists.

Please guys, I need your help !

Oh, and Blueprint is not really a solution because we need to have C++ access to the object and it’s methods without jumping back and forth between BP and C++.

What do I miss ? How do I include a Plugin in C++ ?

---

<div class="post-metadata">

**Author:** ![IllpIll](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IllpIll](https://forums.unrealengine.com/u/IllpIll)\
**Post date:** [September 28, 2015, 4:36pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/2 "2015-09-28T16:36:17Z")

</div>

I believe this procedural mesh component plugin is not available via C++, blueprint is the only way to go.  
You could try copying the plugin to your project and just change all the class and function names, etc. I don’t know.

---

<div class="post-metadata">

**Author:** ![Azarus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Azarus](https://forums.unrealengine.com/u/Azarus)\
**Post date:** [October 1, 2015, 2:48pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/3 "2015-10-01T14:48:07Z")

</div>

Yes, sadly it seems thats the only way to go.

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [October 1, 2015, 3:29pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/4 "2015-10-01T15:29:50Z")

</div>

You can do Procedural Meshes in UE4 C++ without including any plugins, there’s a 10-page long thread around here on procedural meshes somewhere…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcf66e2c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcf66e2c](https://forums.unrealengine.com/u/anonymous_user_bcf66e2c)\
**Post date:** [October 1, 2015, 3:34pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/5 "2015-10-01T15:34:34Z")

</div>

As TheJamsh mentioned, you don’t need the ProceduralMeshComponent to do procedural meshes in C++, you can just build your own component, and scene proxy (for the rendering) and fill it with whatever data you want and render it the way you want to (within reason).

---

<div class="post-metadata">

**Author:** ![Codeweav3r](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Codeweav3r](https://forums.unrealengine.com/u/Codeweav3r)\
**Post date:** [October 2, 2015, 9:56pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/6 "2015-10-02T21:56:52Z")

</div>

About everything you need to know regarding procedural meshes in UE4 is in this thread: [Generate Procedural Mesh - C++ Gameplay Programming - Unreal Engine Forums](https://forums.unrealengine.com/showthread.php?1552-Generate-Procedural-Mesh)

---

<div class="post-metadata">

**Author:** ![SRombauts](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SRombauts](https://forums.unrealengine.com/u/SRombauts)\
**Post date:** [February 20, 2016, 9:32pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/7 "2016-02-20T21:32:56Z")

</div>

Using ProceduralMeshComponent in C++ in UE4.10 is in fact possible and really easy, just follow this quick start guide on the Wiki (just discovered it this evening)

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [March 26, 2018, 8:06pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/8 "2018-03-26T20:06:54Z")

</div>

> [@SRombauts](#):
>
> Using ProceduralMeshComponent in C++ in UE4.10 is in fact possible and really easy, just follow this quick start guide on the Wiki (just discovered it this evening)  
> [A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums](https://wiki.unrealengine.com/Procedural_Mesh_Component_in_C%2B%2B:Getting_Started)

Well. I’m having the same issue (#include file not found) with that tutorial. I just updated it to 4.18 and suddenly stopped working !

---

<div class="post-metadata">

**Author:** ![Jambax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jambax/32/904177_2.png) [@Jambax](https://forums.unrealengine.com/u/Jambax)\
**Post date:** [March 26, 2018, 8:34pm UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/9 "2018-03-26T20:34:51Z")

</div>

4.10 came out over two years ago (this thread is also nearly two years old btw - would have been better to create a new one). You should expect some teething problems. Plugins had a lot of changes around 4.16/4.17 or so - it’s worth looking them up. Lot’s of things will have moved by now.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3a39adab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3a39adab](https://forums.unrealengine.com/u/anonymous_user_3a39adab)\
**Post date:** [January 9, 2019, 10:08am UTC](https://forums.unrealengine.com/t/include-plugin-in-c/43020/10 "2019-01-09T10:08:29Z")

</div>

Hello,

I’m using UE4.18 and I would like to use the OculusHMD module from the OculusVR plugin.  
I have tried the same steps as described above and I’m still not able to include the OculusFunctionLibrary.h.  
I really need the GetRawSensorData() function in C++ to work.

Did someone already find a solution for this?
