google-ar / arcore-unreal-sdk

ARCore SDK for Unreal
https://developers.google.com/ar/
Apache License 2.0
277 stars 122 forks source link

Make C++ project using ARCore 1.2.1 #23

Closed alexandreMarie closed 6 years ago

alexandreMarie commented 6 years ago

Hi everyone,

I want to make C++ project using ARCore and not using blueprints.

So I've started from a blank C++ project. Added the plugin and set all Android SDK fields correctly and I've added the module GoogleARCoreBase in the PublicDependencyModuleNames of MyProject.Build.cs but still I can't include GoogleARCoreFunctionLibrary.h to my project.

As anyone used C++ to make ARCore apps ?

Best regards,

Alexandre

alexandreMarie commented 6 years ago

So for anyone who will make C++ programming with ARCore :

1- Make a blank project 2- Open MyProject.Build.cs and add "GoogleARCoreBase" AND "AugmentedReality" (otherwise you will not be able to call GetAllTrackedGeometries) in the "PublicDependencyModuleNames" 3- Close VS2017 (and also the editor) 4- Run "GenerateVisualStudioProjectFiles" 5- Re-open the .sln 6- Build your project

And normally everything should be fine :)

Sorry for spamming issues. I'm relatively new to AR and C++ Unreal programming.

Bests,

Alexandre

alex-hoffman commented 5 years ago

Hi ! I'm also trying to make a C++ project with ARCore, but I can't find googleARCoreBase anywhere, or anything that could help me build the project. I did some research about C++ with ARCore, but I didn't understand what exactly I need to add to my project, could you help me ?

Best regards Alex

alexandreMarie commented 5 years ago

Hi Alex,

Since a certain release, you can just include "AugmentedReality" module in your project and use the "ARBlueprintLibrary.h" to access the main features.

Furthermore, it can allow you to quickly switch between ARKit and ARCore.

Don't forget to regenerate the visual studio files to update intellisense.

Best Regards,

Alexandre

alexandreMarie commented 5 years ago

Hi @alex-hoffman ,

You can use the "AugmentedReality" module only directly inside your MyProject.Build.cs and use the ARBlueprintLibrary.h inside your .cpp file. It proposes all the main features now.

Hope this helps.

Alex