How to dependency plugin in another plugin?

I have wrote two plugins,and one of them need the module in another. I have tried to add the module in build files,but it always warn that module dependency but plugins not.
And another problem is that when I package one of that,it always told that can not find head files which is in the other plugin

Plugins should not depend on other plugins. Combine them into a single plugin when needed.

I’ve added plugins to a .UPLUGIN definition, works fine and packages.

For reference :

Has dependencies on UnrealFastNoise and the RMC.

I am also write the .uplugin as the same as you.But it will meet erro when package it.

But there was something wrong if you use two plugins at the same times if combine them into a single.
like this :
if PluginA contain PluginB.and then B can not use which the project used A,

PluginA must be loaded as PreDefault, PluginB loaded on Default phase.

A cannot depend on B, but B referencing A works fine.

But how are plugin’s load phases set? I only know of setting the load phase on modules, not plugins, which are just listed as “enabled”.

Plugins are modules.
You define its modules names and loading phase within uplugin file.

So if Plugin B depends on Plugin A, I have to open up the .uplugin of Plugin A, set all its modules to “PreDefault”, open up the .uplugin of Plugin B and set all its modules to Default basically?

In short yes, but things can get more complex than that when you are dealing with plugins that contain multiple modules.
One plugin can have many modules and its own chain of internal dependencies.

After you do that you have to include the dependency to B’s Build.cs file as well.

Yeah that’s the issue I face.
Plugin A is an open source plugin provided by a company, and my plugin (B) requires it to work. Both plugins have two modules each, one for runtime, one for editor, so both plugin’s editor modules depend on their respective runtime modules as well.
While I could make changes to Plugin A, I’d rather not fiddle around too much since it’s not granted that the company will accept a merge request (I think they would though).

How would one go about this though? Since there aren’t an endless amount of phases.

I also have the same problem ,while I resolve it by write plugin dependency info in .uplugin file like the github hyperlink .

As far as I am concerned , you are not the same reason cause the erro ,maybe u include an “Editor” plugin , The plugin includes a lot editor functions which can only run in editor mode.so it has erro. If I am right. The only solution maybe convert the functions of the plugin you use to “Runtime” Functions in a new Custom Plugin!
I hope it helps!

This app might help