Thanks all got it working. Directory.GetCurrentDirectory actually returns a path in the engine code not the project root. I found online someone that found the ModuleDirectory variable. That leads us to the exact spot we want …/Source/ProjectName/. I then get all the directories recursively and add them to the PrivateIncludePaths.
private void IncludeSubdirectoriesInIncludePaths()
{
AddDirectoriesRecursive(ModuleDirectory);
}
private void AddDirectoriesRecursive(string DirectoryPathToSearch)
{
foreach (string DirectoryPath in Directory.GetDirectories(DirectoryPathToSearch))
{
PrivateIncludePaths.Add(DirectoryPath);
AddDirectoriesRecursive(DirectoryPath);
}
}