4.20 migration, missing referenced directories

When migrating to 4.20 I get warnings about referenced directories that do not exist:


These warnings never appeared before. Why does the engine complain about plugins in its source folder, when they are already present in the project folder? Is it the expected behaviour in the new version or is it some sort of a bug? Could someone explain this to me, please?

Got a mail from the marketplace team a few weeks back to update the plugin to support UE 4.20. Here is the change that might be needed (Copied the text from the mail) :

One recent change to note, plugins being built against engine versions 4.20 onward that need to include files from their own plugin directory must add those include paths using the ModuleDirectory property in their .build.cs. If

using System.IO;

exists at the top of the .build.cs, Publishers can use the following syntax where “MyFolder” is the name of the directory under the current module they’d like to include:

PublicIncludePaths.Add(Path.Combine(ModuleDirectory, “MyFolder”));

Thanks for the reply. I tried adding the line but to no avail. Seems like I would need to add all the plugin folders to the engine source folder

Actually it worked, I just forgot to remove the line with the old syntax. Thank you very much

Not very helpful.
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "[PLUGINNAME]"));
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "[PLUGINNAME]/Public"));
seems to work. What am I missing?

replace “PublicIncludePaths.Add(Path.Combine(ModuleDirectory, “[PLUGINNAME]/Public”));” with “PublicIncludePaths.Add(Path.Combine(ModuleDirectory, “Public”));”

I’ve added this line to the build files for all my plugins and the warning still appears. Am I missing something?

You need to add using System.IO; on top of build file as Path.Combine is System IO function.