Plugin dependent on another plugin

FWIW, just tried this out in 4.17. In the .uplugin file of your plugin that will load an additional plugin, add a “Plugins” field on the same level as the other fields:

MyPlugin.uplugin:

"Modules": [
    {
      "Name": "MyPlugin",
      "Type": "Runtime",
      "LoadingPhase": "Default"
    }
  ],
  "Plugins": [                       // <--
    {                                // <--
      "Name": "AdditionalPlugin",    // <--
      "Enabled": true                // <--
    }                                // <--
  ]                                  // <--

Then simply include the additional plugin in the PublicDependencyModuleNames of the plugin’s Build.cs:

MyPlugin.Build.cs:

PublicDependencyModuleNames.AddRange(
	new string[]
	{
		"Core",
		"CoreUObject",
        "Engine",
        "AdditionalPlugin",          // <--
	}
);

And of course make sure the parts of the additional plugin you want to use are properly exported using the ADDITIONALPLUGIN_API notation or you’ll get a LNK2019 unresolved external symbol error.

7 Likes