Hey there,
I’m struggeling with includes. I have code that was working 4hours ago and now it is not… telling me types are unknown.
Here is the code (whole file).
#pragma once
class FDirectoryFileCounter : public IPlatformFile::FDirectoryVisitor
{
uint64 numFiles = 0 ;
uint64 numDirs = 0;
public:
virtual bool Visit(const TCHAR* FilenameOrDirectory, bool bIsDirectory)
{
if (bIsDirectory)
{
++numDirs;
}
else
{
++numFiles;
}
return true;
}
uint64 GetNumFiles() { return numFiles; }
uint64 GetNumDirs() { return numDirs; }
};
This was working, as the types IPlatformFile::FDirectoryVisitor should be included through the basic includes of the engine, done via the build.cs file.?
There is the build.cs
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class SteamWorkshop: ModuleRules
{
public SteamWorkshop(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string] {
"SteamWorkshop/Public"
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string] {
"SteamWorkshop/Private",
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string]
{
"Core",
"OnlineSubsystem",
"OnlineSubsystemUtils",
"OnlineSubsystemSteam",
"SteamworksCustom",
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string]
{
"CoreUObject",
"Engine",
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}
As unreal has a pretty old implementation of Steam SDK, I’m forced to include the current Steam SDK version manually. So I made another module that has the SDK in it and changed the build.cs file to depend on SteamworksCustom instead of Steamworks. Now everything seems to go viral and I have no idea why. Why is it complaining on a file that has nothing to do with this, does not even depend on the steam stuff .
I tried to go back to the unreal Steam SDK (Steamworks module) but the include issue persists…
There are also other files that have issues with the basic types. What could have caused this? Already tried rebuilding, deleting intermediate files.