FPakFile public Constructor Inaccessible. Why does VS want to reference the FPakFile private destructor instead?

I have exact same problem!
Documentation states to use #include “IPlatformFilePak.h”.

Edit:
My wonderful college at work helped me and he fixed it.
It must be that Unreal updated the pipeline, but also did not documented how
It should be used.

Instead of

FPakFile PakFile(PakPlatformFile, *PakFilePathFull, false);

Should be:

FPakFile* PakFile = new FPakFile(PakPlatformFile, *PakFilePathFull, false)

Then in your ProjectName.Build.cs you need to add “PakFile”

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "PakFile" });
1 Like