Sure, The only modification I've made to the cs file is the one to allow it to run it for 4.19 (uncomment the line 23 and comment line 19 on SpinePlugin.Build.cs)
SpineEditorPlugin.Build.cs:
using System;
using System.IO;
namespace UnrealBuildTool.Rules
{
public class SpineEditorPlugin : ModuleRules
{
public SpineEditorPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));
PublicDependencyModuleNames.AddRange(new string[] {
"Core",
"CoreUObject",
"Engine",
"UnrealEd",
"SpinePlugin"
});
PublicIncludePathModuleNames.AddRange(new string[] {
"AssetTools",
"AssetRegistry"
});
DynamicallyLoadedModuleNames.AddRange(new string[] {
"AssetTools",
"AssetRegistry"
});
}
}
}
SpinePlugin.Build.cs:
using System;
using System.IO;
namespace UnrealBuildTool.Rules
{
public class SpinePlugin : ModuleRules
{
public SpinePlugin(ReadOnlyTargetRules Target) : base(Target)
{
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "RHI", "RenderCore", "ShaderCore", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
//PublicDefinitions.Add("SPINE_UE4");
// For UE 4.19 and below comment the line above and uncomment the line
// below.
Definitions.Add("SPINE_UE4");
}
}
}
I tried to run the samples but it asked me to compile from source and when I tried to do that I received the same error.
The path the cs file is adding is "../SpinePlugin/Public/spine-cpp/include" (the problem seems to be in spineEditorPlugin), and the header in question is in "\SpinePlugin\Source\SpineEditorPlugin\Private".
There seems to be a typo on both SpineEditorPlugin.Build.cs and SpinePlugin.Build.cs.
I changed the line
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
for
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));
on both files and it worked.