Access engine's c++ code from blueprint?

Hello guys,

I am currently using UE 4.23 new ARkit pose tracking feature and wondering that if there is any way to make
engine 's c++ code accessible from a blueprint. This new feature seems to be in c++ only.

The AppleARkit c++ file I am trying to use is called “AppleARKitPoseTrackingLiveLinkRemapAsset”, I want to use some of the functions and make them accessible in my own blueprint.

If I want to access the c++ function, should I create another own c++ file to call them?

Thanks for any help!

I’ve not worked with ARKit, but generally yes; if you want to expose C++ functions to Blueprints, you can create a Blueprint Function Library.
In your project, File > New C++ Class, then choose Blueprint Function Library as the parent class.

Thank you for the reply!
And just another question, when I tried to include the ARKit header file (which is in the engine plugin folder ) into the BP function library, but an error occurs which says cannot open include file.
(header name: AppleARKitPoseTrackingLiveLinkRemapAsset.h)

I had tried to include the engine’s path and added the “AppleARkit” into my project’s build.cs like:

PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore” , “AppleARKit” });
PrivateDependencyModuleNames.AddRange(new string[] { “AppleARKit” });

But still both methods don’t work, is there any other way to solve this problem?

“AppleARKitPoseTrackingLiveLinkRemapAsset.h” is in private folder, is this the reason that I can’t get access to it by including header file