Hi there,
I have a minimal project with two modules - the default game project module and a sibling module, called “Terrain”, which depends on the engine’s ProceduralMeshComponent module (located in a plugin of the same name at Engine\Plugins\Runtime\ProceduralMeshComponent).
I can compile and run just fine with the Terrain module listing ProceduralMeshComponent module as a dependency:
PublicDependencyModuleNames.AddRange(new[] {
"Core", "CoreUObject", "Engine", "InputCore", "SlateCore", "Slate", "ProceduralMeshComponent"
});
PrivateDependencyModuleNames.AddRange(new string[] {});
But the IDE (Rider) warns that “ProceduralMeshComponent is missing in the project file”.
I can make the warning go away by adding the ProceduralMeshComponent plugin (not module) to the plugins list in my .uproject file:
"Plugins": [
{
"Name": "ProceduralMeshComponent",
"Enabled": true
}
]
But I’m told in the UnrealSlackers discord server that ProceduralMeshComponent should actually be added to the additionalDependencies list of my Terrain module’s entry in the modules list of the .uproject file:
"Modules": [
...,
{
"Name": "Terrain",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"ProceduralMeshComponent"
]
}
]
This also runs fine, but does not get rid of the IDE warning described above.
Could someone shed some light on what the difference is between all of these approaches?
- Only declare a dependency on the engine module in my module’s .build.cs file
- Do #1, then also declare a dependency on the engine module’s plugin in the .uproject file’s
pluginslist - Do #1, then also declare a dependency on the engine module in the
additionalDependencieslist for my module’s entry in themoduleslist in the .uproject file (or is this a plugin dependency?ProceduralMeshComponent's plugin and module have the same name, so unclear which one is being depended upon here) - Do #1, #2, and #3 (???)
There seem to be multiple ways to declare dependencies - it would be excellent to understand the purpose of each way, as well as how they differ from each other.
Thanks!!

