Cannot open include file: 'AnimationStateNodes/SGraphNodeAnimState.h':

Hi,

I’m getting an error when i’m trying to include SGraphNodeAnimState header file.

Error message : Error C1083 Cannot open include file: ‘AnimationStateNodes/SGraphNodeAnimState.h’: No such file or directory.

I’ve added “GraphEditor/Private” path to private include paths in my PluginName.Builds.cs.

This is what my Build.cs looks like. Am i missing something?




using UnrealBuildTool;

public class StoryEditorModule : ModuleRules
{
	public StoryEditorModule(TargetInfo Target)
	{
		
		PublicIncludePaths.AddRange(
			new string] {
				"StoryEditorModule/Public"
				// ... add public include paths required here ...
			}
			);
				
		
		PrivateIncludePaths.AddRange(
			new string] {
				"StoryEditorModule/Private",
                                "GraphEditor/Private",
				// ... add other private include paths required here ...
			}
			);
			
		
		PublicDependencyModuleNames.AddRange(
			new string]
			{
				"Core",
				// ... add other public dependencies that you statically link with here ...
			}
			);
			
		
		PrivateDependencyModuleNames.AddRange(
			new string]
			{
				"CoreUObject",
				"Engine",
				"Slate",
				"SlateCore",
				// ... add private dependencies that you statically link with here ...	
                                "AssetTools",
                               "StoryModule",
                               "UnrealEd",
                               "EditorStyle",
                               "GraphEditor",
                               "Kismet",
                       }
		       );

    }
}


Private typically means just that, so you wouldn’t normally be including it from another module (and you will probably run into link errors as it wasn’t expecting to be DLL exported). However, you can try using a ‘full’ path to include it; in this case:

#include “Editor/GraphEditor/Private/AnimationStateNodes/SGraphNodeAnimState.h”

Cheers,
Michael Noland

Thanks Nolan.

Giving full path worked for me. But I though that was the point of adding some path to PrivateIncludePaths.
What’s the point of adding paths to PrivateIncludePaths if have to give full path anyway?

I’m looking SGraphNodeAI.cpp which rests in AIGraph module.

This doesn’t cause any linker errors, maybe due to GRAPHEDITOR_API macro?



FReply SGraphNodeAI::OnMouseDown(const FGeometry& SenderGeometry, const FPointerEvent& MouseEvent)
{
	UAIGraphNode* TestNode = Cast<UAIGraphNode>(GraphNode);
	if (TestNode && TestNode->IsSubNode())
	{
		GetOwnerPanel()->SelectionManager.ClickedOnNode(GraphNode, MouseEvent);
		return FReply::Handled();
	}

	return FReply::Unhandled();
}


This is one of the functions in SGraphNodeAI.cpp that needs SGraphPanel’s definition. There are more of them.

This is AIGraph.Build.cs PrivateIncluePaths section.



PrivateIncludePaths.AddRange(
            new string] {
				"Editor/GraphEditor/Private",
				"Editor/Kismet/Private",
				"Editor/AIGraph/Private",
			}
);


Edit: SGraphNodeAI::OnMouseDown isn’t a virtual function