Plugin public header unacessible

For 4 days now i cant figure out why my public header file cannot be found by the private header or cpp. It is properly set up in the module’s public and private paths in the plugin build file. I even tried adding the paths to the projects build file, to no avail.

Hello Creedzy,

To make header “visible” you should add module name (in which the header is) to Module.Build.cs file for current module (to which you want to connect it).
Let me know if that’s what you were looking for or if you need more details!

Best regards,

Maybe I should have been more specific, but as I did not get any answers on my previous questions I didn’t really expect an answer to this one either. This is what my build file looks like. I already had the module dependency. I have this build file, and I have a IKinect Header file in the public folder.
Anything that’s in the private folder of that module cant access the public folder, like for example any other header files or code files. I am wondering why that is happening. I read somewhere that i should include header guards, would that help. I have other problems with the linker and etc, but i’d like to fix this first.

Hi Creedzy,

Sorry for the lag. I will answer on all of your questions about kinect.

Let’s sync it. I checked all your questions about Kinect and I have several questions.
I wonder where you located all these files. Did I correctly understand: You copy kinect 1.8 library (include and lib) to (ThirdParty?) and then you create wrapper module to implement interface you want?

It looks like you forget specify library location.

string KinectDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "Kinect2/v1.8/";
	PublicSystemIncludePaths.AddRange(
		new string[] {
			KinectDir + "include",
		}
	);

Anyway, let’s just try to recreate it step by step
I tested on QAGame example, Kinect 1.8.

  1. I create third party library location (Engine\Source\ThirdParty\Kinect2\v1.8). Copy include and library to it. (For example of library structure look at libpng or FBX libraries)

  2. My build file looks like link.

  3. Next I try to add wrapper that uses Kinect library and provide simple interface to QAGame (\Engine\Source\Developer). For example better to take ImageWrapper. link

  4. I create zip archive for KinectModule. Make attention to KinectWrapperBase.cpp. There are special includes that allow to use some deprecated UE4 types (for more details look at Core.h line 492).

  5. Next I add ImageWrapper module dependency to QABuild.cs and execute next code

    IKinectWrapperModule& KinectWrapperModule = FModuleManager::LoadModuleChecked(FName(“KinectWrapper”));
    IKinectWrapper* pKinectWrapper = KinectWrapperModule.CreateKinectWrapper();
    pKinectWrapper->CreateKinectDevice();
    delete pKinectWrapper;

Please, if you have some troubles with it, describe it more detail (Errors, code example, etc).

Best regards,

Wow thats brilliant! Thank you! I dont have time at the moment, but I will look at it tonight and I will tell you how it went.