Failed to include header from private engine path

Hi,

I am trying to write a module to add some post process shader code into Unreal’s FPostProcessing::Process function. However, when I include the “Runtime/Renderer/Private/PostProcess/PostProcessing.h” header, I get the following error:

e:\UE_4.19_Q_BUILD\Engine\Source\Runtime/Renderer/Private/PostProcess/PostProcessing.h(12): fatal error C1083: Cannot open include file: 'PostProcess/RenderingCompositionGraph.h': No such file or directory

I believe the error comes from the PostProcessing header itself, since it fails to include the other header which is in the same folder.

I have set up my Module includes as following:

PublicIncludePaths.AddRange(
	new string[] {
		"PostProcessEffects/Public",
		"Runtime/Renderer/Public",
		"Runtime/Renderer/Public/CompositionLighting",
		"Runtime/Renderer/Public/PostProcess",
	}
	);
				
		
PrivateIncludePaths.AddRange(
	new string[] {
		"PostProcessEffects/Private",
		"Runtime/Renderer/Private",
		"Runtime/Renderer/Private/CompositionLighting",
		"Runtime/Renderer/Private/PostProcess",
	}
	);

Is there anything I have missed?

Thanks

Nevermind, I answered my own question

Appearantly setting my includes like following fixed my problem:

PublicIncludePaths.AddRange(
	new string[] {
		"PostProcessEffects/Public",
		"Runtime/Renderer/Public",
		"Runtime/Renderer/Private",
	}
	);
				
		
PrivateIncludePaths.AddRange(
	new string[] {
		"PostProcessEffects/Private",
	}
	);

I am unsure what the difference is between PublicIncludePaths and PrivateIncludePaths

In 4.22, Setting includes like this way in xx.build.cs:

    PublicIncludePaths.Add(Path.Combine(EngineDirectory, "Source/Runtime/Renderer/Private"));
1 Like