FMOD Unreal - No such file or directory


I’m trying to create an AudioComponent in cpp code in my project. I’ve downloaded the plugin files to Plugins/FMODStudio/ and generated a solution file for my project using FMOD as a plugin. It works so far using the Audio Component in Engine via blueprints etc. But now trying to transfer it into cpp code Visual Studio says fatal error C1083: “FMODAudioComponent.h”: No such file or directory at compile time. The directory seems to be included however. The code look like this:

I’ve used a forward declaration in the header file. What am I doing wrong?

I’ve solved the problem by adding the following line to the Build.cs file in the code directory:
PrivateDependencyModuleNames.AddRange(new string[] { "FMODStudio" });
Turns out it sometimes really is too obvious to notice it. I hope this is helpful for others in the future. :slight_smile:

1 Like