Hello everyone.
I made simple plugin that contains two modules: SimplePlugin (Editor) and SimpleRuntime (Runtime).
Here is SimplePlugin module:
class ISimplePluginModule : public IModuleInterface
{
public:
virtual bool IsNumberIsEqual42(int32 num) const = 0;
static inline ISimplePluginModule & Get()
{
return FModuleManager::LoadModuleChecked<ISimplePluginModule>("SimplePlugin");
}
static inline bool IsAvailable()
{
return FModuleManager::Get().IsModuleLoaded("SimplePlugin");
}
};
And in SimpleRuntime module i’m using this method:
bool ISimpleRuntimeModule::IsNumberEquals42(int32 num) const
{
if (ISimplePluginModule::IsAvailable())
{
return ISimplePluginModule::Get().IsNumberIsEqual42(num);
}
return false;
}
Then i export this plugin to my other project. I don’t want to build this plugin each time, so i pack plugin with all folders: Binaries, Intermediate, Resources and Source (without Private folders).
Now everything works fine, i can include my module and use it with my interface. But i can’t compile from Visual Studio, only from UE Editor.
In Visual Studio i got:
LINK : fatal error LNK1181: cannot open input file 'path-to-project\Plugins\SimplePlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SimpleRuntime-5027.lib'
ERROR : UBT error : Failed to produce item: path-to-project\Binaries\Win64\UE4Editor-TestProject-2912.dll
Looks like in Visual Studio i’m trying to build again my plugin, but not in UE Editor.
How can i fix this?
You can get my plugin from this link (compiled with UE 4.13.2)