Can the plug-in source code import the custom C++ class of the main project module?

I create a UE4 project and using a plugin called AirSim that download form the github. When I include a custom C++ class file(for example ATestClass) from main project(main module), there report a error: fatal error C1083: can not open include file :“TestClass.generated.h”: No such file or directory.

I have learned about module dependencies in UE4. Now I just want to know whether the source code part of the plug-in can be imported into the custom C++ class in the main module and used.

I do not advise you to use your game class in a plugin but instead do the opposite, include your plugin files into your project but if you realy want to you can juste add your project name to the modules list (it is located in the file “YourPluginName.Build.cs”) of your plugin like that :

In this case my game name is “AbracodabraGame” so i juste had it at the end of the dependencies of my plugin

Thanks your reply. You are right. In addition, I can also directly add the source code of the c++ plug-in directly to the project