Call another plugin's static function in my own plugin problem

I need to call another plugin’s static function in my own custom plugin with C++ code, the project can compile, but occured link error, can’t access another plugin from one plugin in unreal?

It’s not recommended but it is possible, so long as the other plugin has exported the function. In the .h where the function is declared, it needs to be preceded with OTHERPLUGINMODULENAME_API.

If that’s the case, you need to include that header from your plugin, and also add the following to your plugin’s build.cs file.



PublicDependencyModuleNames.Add("OtherPluginModuleName");


Is “OTHERPLUGINMODULENAME_API” an actual thing? If not could you have provide example code for the header file (.h file)?

Edit: Never mind. The solution that was not included here was to include the other plugin’s header, i.e. :


#include "OtherPluginModuleName.h"

should do the trick in theory. Have to test yet.

Not really, have to do like he said; include the module in Build.cs than include in your header the .H of the function you want to call.
The plugin must export the function.
(a plugin may have several header files)