Cannot open include header file

I’m working on a plugin that contains custom K2Node and I wanted to use SGraphNodeK2Sequence to display it.
In the K2Node’s .cpp file I have added #include “Editor/GraphEditor/Private/KismetNodes/SGraphNodeK2Sequence.h”.
However I’m getting the following error: “C1083 Cannot open include file: ‘KismetNodes/SGraphNodeK2Base.h’: No such file or directory”. SGraphNodeK2Base is the parent of SGraphNodeK2Sequence.

I have tried including that header directly but I get the same error. If it matters, the plugin is currently set as a Runtime plugin so this might affect what modules can be used. I’m also using other classes from the GraphEditor but they come from the Public folder.

You need to add GraphEditor to your Module’s Private Include paths, like so:

(in your .Build.cs file)

			PrivateIncludePathModuleNames.AddRange(
				new string[] {
					"GraphEditor",
					// ... add other private include paths required here ...
				}
				);

Thanks for your reply but I already tried adding the module and it doesn’t change anything.
The reason this doesn’t work is because SGraphNodeK2Sequence is a private class and it’s not part of the .dll. You can see that it’s missing the _API extension next to the class name. I included the full path to GraphEditor/Private but then I get linker errors.

Fortunately, SGraphNodeK2Base can be overridden, so you just have to implement (copy & paste) your own Sequence node.