I am working on a project that has several plugins with their own Build.cs files. I am having an issue where these Build.cs files can not find files that exist within the same source folder unless I provide an include path all the way from my C: drive. For example, in my AmbientConditionsPlugin.Build.cs file
PublicIncludePaths.AddRange(
new string[] {
"AmbientConditionsPlugin/Public"
// ... add public include paths required here ...
}
);
Gives the warning:Severity Code Description Project File Line Suppression State
Warning Referenced directory âC:\Program Files\Epic Games\UE_4.21\Engine\Source\AmbientConditionsPlugin\Publicâ does not exist. ScenarioGenerator C:\Users\USR\Documents\Unreal Projects\Duplicate\PluginSimulatorExampleProject\Plugins\AmbientConditionsPlugin\Source\AmbientConditionsPlugin\AmbientConditionsPlugin.Build.cs 1
If instead I use
PublicIncludePaths.AddRange(
new string[] {
"C:/Users/USR/Documents/Unreal Projects/Duplicate/PluginSimulatorExampleProject/Plugins/CameraSensorPlugin/Source/CameraSensorPlugin/Public"
}
);
the warning goes away. This functions fine as a workaround but doesnât fix my underlying issue.
Additionally, when I try to list my other plugins as dependencies I get a warning that theyâre not being found. For example, in the same AmbientConditionsPlugin.Build.cs file
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"ConfigurationPlugin"
}
);
gives the warning "Severity Code Description Project File Line Suppression State
Warning Warning: Plugin âAmbientConditionsPluginâ does not list plugin âConfigurationPluginâ as a dependency, but module âAmbientConditionsPluginâ depends on âConfigurationPluginâ. ScenarioGenerator C:\Users\USR\Documents\Unreal Projects\Duplicate\PluginSimulatorExampleProject\Intermediate\ProjectFiles\UnrealBuildTool 1
How do I get these build files to search my project folders instead of defaulting to the UE4.21\Engine folder? Iâve tried updating the Include directories in the project properties, but it doesnât seem to have any effect.
This project was originally developed on Linux and I am attempting to build it on Windows 10. My team members are able to successfully build this project on their Linux machines and use the simplified include paths detailed in my first code example (âAmbientConditionsPlugin/Publicâ).