Why does the Hydra plugin only work in editor (PIE)?

I’ve got my Hydras all setup using the Hydra plugin by GetNamo, but whenever I build or package my game, the Hydras won’t activate. The module specifically fails at this call:

if ( IHydraPlugin::IsAvailable() )
… which calls…
return FModuleManager::Get().IsModuleLoaded( “HydraPlugin” );

I can’t figure out why this works in the editor but not when building. I did notice that it will succeed in building “UE4Editor-HydraPlugin.dll” but no similar one for the non-editor version.

Furthermore, the instructions say to put “HydraDelegate.cpp” in both your source files AND have it in the Hydra plugin. This works fine for the editor build, but results in a multitude of linking errors when attempting to build Development (developmentgame) instead of editor.

I added a “#if WITH_EDITOR” directive around one of them to make it compile for both Development and Development Editor, but I think this might be causing it to not get loaded in the non-editor version.

Anyone able to help with this?

Afraid this is going to get lost… :o

After trying out a few things I’ve discovered that in Shipping Build the plugin module is absorbed into the game module and this will require some sort of conditional build settings to get things right (as you’ve discovered with it not requiring the duplicate HydraDelegate.cpp).

If any epic staff can shed light on typical guidelines for how to handle this, it would be much appreciated.

I just wasted a day trying to figure out why its not working - then I found this topic :slight_smile:

If anyone will come up will solution please let us know!

You most likely had no code in your project.

As of v0.6.3 (UE4.3) of the plugin all you need to do for the plugin to work with shipping build is:

  1. Your project needs code. Even if you’re using blueprint only, add code to your project and compile (it doesn’t need to do anything).
  2. Package your game
  3. Copy the full or slimmed-down (found in ShippingBuildOnly) Plugins folder into your packaged build {ProjectName} folder. E.g. if I packaged a project called HydraTest in my packaged directory (typically called WindowsNoEditor) find the HydraTest folder and place the Plugins folder there.
  4. Confirm its working by launching your packaged game from the Binaries subfolder.

See Hydra Plugin - Main Thread, shipping post for details and troubleshooting.