Hello! I am trying to package my project but I always get an error. I made a custom K2Node, which works perfectly on the editor, but when I package I get the following error:
Error: Couldn't find parent type for 'K2Node_GetSequenceBinding' named 'UK2Node' in current module or any other module parsed so far.
I suppose that I need to add some module dependency in the build file, but I don’t know which and where exactly. I have tried to add “BlueprintGraph” and “MovieSceneTool” but nothing is working.
My current build files are:
[SPOILER]MyProject.Build.cs
using UnrealBuildTool;
public class MyProject : ModuleRules
{
public MyProject(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string] { "AIModule" , "GameplayTags", "GameplayTasks", "UMG", "BlueprintGraph"});
// Uncomment if you are using Slate UI
PrivateDependencyModuleNames.AddRange(new string] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
}
}
MyProjectEditor.Build.cs
using UnrealBuildTool;
using System.IO;
public class MyProjectEditor : ModuleRules
{
public MyProjectEditor(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
var EngineDir = Path.GetFullPath(Target.RelativeEnginePath);
PublicIncludePaths.AddRange(new string] {
"MyProjectEditor/Public"
});
PrivateIncludePaths.AddRange(new string] {
"MyProjectEditor/Private",
Path.Combine(EngineDir, @"Source/Developer/AssetTools/Private")
});
PublicDependencyModuleNames.AddRange(new string] { "MyProject"});
PrivateDependencyModuleNames.AddRange(
new string]
{
"Core",
"CoreUObject",
"Engine",
"AssetTools",
"InputCore",
"PropertyEditor",
"Slate",
"SlateCore",
"EditorStyle",
"MainFrame",
"UnrealEd",
"BlueprintGraph",
"Kismet",
"KismetCompiler",
"GameplayTags",
"RenderCore"
});
PrivateIncludePathModuleNames.AddRange(new string] { });
DynamicallyLoadedModuleNames.AddRange(new string] { });
if (Target.bBuildDeveloperTools || (Target.Configuration != UnrealTargetConfiguration.Shipping && Target.Configuration != UnrealTargetConfiguration.Test))
{
PrivateDependencyModuleNames.Add("GameplayDebugger");
Definitions.Add("WITH_GAMEPLAY_DEBUGGER=1");
}
else
{
Definitions.Add("WITH_GAMEPLAY_DEBUGGER=0");
}
}
}
MyProjectTarget.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectTarget : TargetRules
{
public MyProjectTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange( new string] { "MyProject" } );
if (bBuildEditor)
{
ExtraModuleNames.AddRange(new string] { "MyProjectEditor" });
}
}
}
MyProjectEditorTarget.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class MyProjectEditorTarget : TargetRules
{
public MyProjectEditorTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
ExtraModuleNames.AddRange( new string] { "MyProject", "MyProjectEditor" } );
}
}
[/SPOILER]
Can someone help me?