Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

generated.h Not found by plugin


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 :)

Product Version: UE 4.14
more ▼

asked Apr 13 '17 at 10:51 PM in C++ Programming

avatar image

26 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Apr 14 '17 at 06:26 AM

avatar image

1k 13 8 31

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question