Cannot find private header file

I’m trying to extend off of FConnectionDrawingPolicy to create nice straight connections in an editor as it is a vertical style (think the behaviour tree editor). To do this I’ve tried to copy the behaviour tree’s connection drawing policy to recreate its lines. However I cannot extend FConnectionDrawingPolicy as I cannot get it to include ConnectionDrawingPolicy from Editor/GraphEditor/Private/.

I have copied all of the dependencies and private include paths in my build file from the behaviour tree editor build file and it still will not allow me to include the file.

Hi there! Provided you’ve got “GraphEditor” as a module dependency in your .Build.cs file, you should be able to see, and #include "ConnectionDrawingPolicy.h" from anywhere inside your module. Is this not the case?

The header itself resides inside the Public folder (not Private, as stated in the question) so it should be exposed and visible. FConnectionDrawingPolicy is also marked as GRAPHEDITOR_API which means it is safe to be extended from by clients.

Could you elaborate on your module structure and possibly provide us with a snippet of source code?

Thanks for the response. I’m looking at the source code I got from git hub at the moment and both the header and the cpp file are located in the private folder. It is exposed with the API though, which should make it visible? I have the graph editor dependency set in my build file (I’ll paste it at the bottom).

My module structure at the moment is: LootSystem, LootSystemEditor (dependent on LootSystem of course) and my primary game module which is also dependent on LootSystem. Within the editor module I have a couple of folders, one for the module core (the module files and PCH) and the other for my loot table editor which houses all of the classes relevant to that particular editor.

The build files contents:

PrivateIncludePaths.AddRange(new string[] { “LootSystemEditor/ModuleCore”, “LootSystemEditor/LootTableEditor”, “Editor/GraphEditor/Private”, “Editor/Kismet/Private” });

    PrivateDependencyModuleNames.AddRange(
        new string[] {
			"Core", 
			"CoreUObject", 
			"Engine", 
            		"RenderCore",
           		        "InputCore",
			"Slate",
			"SlateCore",
            		"EditorStyle",
			"UnrealEd", 
			"MessageLog", 
			"GraphEditor",
            		"Kismet",
            		"PropertyEditor",
			"AnimGraph",
			"BlueprintGraph",
            		"LootSystem"
		}
    );

    PrivateIncludePathModuleNames.AddRange(
        new string[] {
			"AssetRegistry",
			"AssetTools",
            	"PropertyEditor",
			"ContentBrowser",
            	"GraphEditor"
		}
    );

    DynamicallyLoadedModuleNames.AddRange(
        new string[] { 
			"WorkspaceMenuStructure",
            	"PropertyEditor",
			"AssetTools",
			"AssetRegistry",
			"ContentBrowser"
        }
    );

I tried also adding a public dependency module for GraphEditor on the chance that it would make it show up, but no such luck.

Thanks for the info - I just checked the history of the header, and it appears it was only very recently moved to the Public folder (1 month ago) You can find the change here if you can’t wait to get the branch with the change on. Feel free to cherry-pick it locally, or just move that header manually for now (and fix up the associated #include in ReferenceViewerSchema.cpp.

Thanks for the info. Hopefully I’ll see the change in a 4.6.1 or 4.7. I’ll just leave it out for now and wait for it to make its way into the release, as it’s a purely cosmetic thing in my editor.