Cannot find BuoyancyComponent.h for C++ pawn

I’m trying to add Buoyancy to a pawn in C++

#include "BuoyancyComponent.h"

The include gives me the error “cannot open source file "BuoyancyComponent.h”. The Water plugin is installed. And I can add buoyancy to an pawn in blueprint. I can see the Water plugin in the experimental folder. What more do I need to do?

Add the plugin as a dependency in your project’s build.cs file and recompile it with editor closed

1 Like

Thank you it worked.

I added “Water” to PublicDependencyModuleNames in MyGame.Build.cs
I also had to delete the Binaries and Intermediate folders and then “Generate Visual Studio Project files” for it to work properly (for other who might read this in the future)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.