How to access a file in private folder in module

I’m modifying ShapeTrace to make the cylinder work.

I inherited FCollisionShape and tried to create a structure only for Cylinder.
but this method is blocked in GeomSweepMulti.
because in this method create FGeomSQAdditionalInputs.
FGeomSQAdditionalInputs creates only Capsule, Sphere, and Box, and otherwise generates ensure(false).

so I copied these method (including all the submethods) codes and made a method just for the cylinder.
however, this method generates lnk2019.
I confirmed that I added a module to build.cs.
I found out that the header file only generates errors when it is in Private folder.
I’ve exposed related files to solve this problem, but there are too many related files.

Is there no answer but to modify the engine to access the files hidden in the Private folder?
or can you share your experience of modifying ShapeTrace or give me a hint?

thank!

Unfortunately Private can not be accessed from an external module. Also the struct needs to be exported out of the module with the WHATEVERMODULE_API line. FCollisionShape is not exported. Meaning you cant derive from it from an external module. Only way is to modify engine code and export it.

From what I understand you want to access private header files located in the engine directory?

You could try adding something like this to your project’s Build.cs (replace the path to match your case):

PrivateIncludePaths.AddRange(
            new string[] {
                Path.GetFullPath(Path.Combine(EngineDirectory, "Plugins/Runtime/Nvidia/Ansel/Source/Ansel/Private")),
            });

I made a new module by referring to the following link :

And the implementation has been imported into this module.

int FSQHitchRepeaterCVars::SQHitchDetection = 0;
FAutoConsoleVariableRef FSQHitchRepeaterCVars::CVarSQHitchDetection(TEXT("p.SQHitchDetection"), FSQHitchRepeaterCVars::SQHitchDetection,
	TEXT("Whether to detect scene query hitches. 0 is off. 1 repeats a slow scene query once and prints extra information. 2+ repeat slow query n times without recording (useful when profiling)")
);

int FSQHitchRepeaterCVars::SQHitchDetectionForceNames = 0;
FAutoConsoleVariableRef FSQHitchRepeaterCVars::CVarSQHitchDetectionForceNames(TEXT("p.SQHitchDetectionForceNames"), FSQHitchRepeaterCVars::SQHitchDetectionForceNames,
	TEXT("Whether name resolution is forced off the game thread. This is not 100% safe, but can be useful when looking at hitches off GT")
);

float FSQHitchRepeaterCVars::SQHitchDetectionThreshold = 0.05f;
FAutoConsoleVariableRef FSQHitchRepeaterCVars::CVarSQHitchDetectionThreshold(TEXT("p.SQHitchDetectionThreshold"), FSQHitchRepeaterCVars::SQHitchDetectionThreshold,
	TEXT("Determines the threshold in milliseconds for a scene query hitch.")
);