# generated.h Not found by plugin

**URL:** <https://forums.unrealengine.com/t/generated-h-not-found-by-plugin/390869>\
**Category:** Audio\
**Tags:** wwise, unreal-engine, generated, UE4, question, CPP\
**Created:** [April 13, 2017, 10:51pm UTC](https://forums.unrealengine.com/t/generated-h-not-found-by-plugin/390869 "2017-04-13T22:51:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baltazards](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Baltazards](https://forums.unrealengine.com/u/Baltazards)\
**Post date:** [April 13, 2017, 10:51pm UTC](https://forums.unrealengine.com/t/generated-h-not-found-by-plugin/390869/1 "2017-04-13T22:51:47Z")

</div>

Hi,

I’m using the Wwise plugin in my project and I want to create a sound occlusion/obstruction system,

So what I did is I created a class inheriting from “UPhysicalMaterial”, and added a SoundOcclusion float value. So that’s working great.

Now the problem is that in a class from the Wwise plugin I want to do a Raycast from the sound source to the listenner and if there is something on the way get the “Physical Material” of that object. So I included my UPhysicalMaterial child class (called TNHPhysicalMaterial) in the Wwise .cpp file to cast the original PhysicalMaterial and get my occlusion value like this :

```
if (OutHit.PhysMaterial != nullptr)
{
      UTNHPhysicalMaterial* PhysicalMaterial = Cast<UTNHPhysicalMaterial>(OutHit.PhysMaterial.Get());
      if (PhysicalMaterial)
      {
          ListenerOcclusionInfo[ListenerIdx].TargetValue = PhysicalMaterial->SoundOcclusion;
      }
}

```

Now first there is a problem when I include my class with this :

```
#include "TNHPhysicalMaterial.h"

```

It doesn’t find the file so what I did was this :

```
#include "../../../../../Source/TNH/TNHPhysicalMaterial.h"

```

So it finds it but tells me this :

"Cannot open include file “TNHPhysicalMaterial.generated.h” and the error leads me to the TNHPhysicalMaterial.h

I regenerated the visual studio project files and rebuild the solution but still have the error

Does anyone know what to do ?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![c4tnt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@c4tnt](https://forums.unrealengine.com/u/c4tnt)\
**Post date:** [April 14, 2017, 6:26am UTC](https://forums.unrealengine.com/t/generated-h-not-found-by-plugin/390869/2 "2017-04-14T06:26:50Z")

</div>

Hi. It seems you haven’t include a module contains “TNHPhysicalMaterial.h” file to the dependencies of your plugin. You have to add a new dependency to your plugin .cs build file and then use

```
#include "TNHPhysicalMaterial.h"

```

which will be visible to the builder after that.

If your include file is placed into the game module it’s not a good idea to reference this module from a plugin. To solve this you can create an interface gives you possibilities to do what you need (and store this inside a plugin), and then include this interface inside your game and inherit your class from this interface.
