Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Combine ARCore SDK and Vuforia 7.2 in the same project

Discussion in 'Vuforia' started by Snake9, Aug 2, 2018.

  1. Snake9

    Snake9

    Joined:
    Nov 18, 2016
    Posts:
    20
    Hello,

    Since yesterday I'm trying to use both ARCore SDK and Vuforia 7.2 in a same Unity Project.
    My goal is to use Vuforia for Image Recognition (because it has better results than ARCore Image Recognition), and ARCore for planes detection in order to place objects on surfaces (like in Ikea Place). I want to use ARCore instead of Vuforia Ground Plane because I want to access to some ARCore sdk components provided by their package : plane generator, pointcloud visualizer, environmental lightning, etc...

    As you may know, in Unity's PlayerSettings/XR Settings, when we check both ARCore Supported and Vuforia Augmented Reality Supported, we have a warning message by Unity : "Both ARCore and Vuforia XR Device cannot be selected at the same time. Please select only one XR Device that will manage the Android device." (see attached file)

    I am using Unity 2018.1.6. After having updated Vuforia to 7.2.24 and imported ARCore unitypackage 1.3.0, and after some debugging to build the application (I had to apply some changes to AndroidManifest.xml), I finally success to combine both sdk in a same project.

    So I have a project with 3 scenes : the main scene with only 2 buttons permitting to load scene 1 or scene 2.
    scene 1 is the example HelloAR from ARCore package, with a back button to go back to the main scene.
    scene 2 is a basic Vuforia scene with only ARCamera and an ImageTarget, with back button too.
    In XRSettings, both ARCore and Vuforia are checked.

    And surprise : the application seems to work well, and I didn't expect that because of the red message from Unity specifying we don't have to select both ARCore and Vuforia in the same project. I can switch between the scenes and everything works as it should.

    So, I don't get why there is such a warning message from Unity. What can be the issues having both ARCore supported and Vuforia Augmented Reality supported in the same project ?
     

    Attached Files:

  2. LearningM

    LearningM

    Joined:
    Aug 31, 2018
    Posts:
    4
    It seems that you separate ARCore and Vuforia in different scenes.

    Did you combine them into one scene successfully?

    I am doing something similar as you, though Vuforia integrate ARCore in latest release, it seems
    we can't get the sdk component such as pointcloud visualizaer and environmental lighting at the same time.

    The problem I came across is that both Vuforia and ARCore has its own camera, how to combine them into one camera in the same scene.
     
    Last edited: Sep 6, 2018
  3. jarileon

    jarileon

    Joined:
    Jun 2, 2017
    Posts:
    58
    I am curious about this too. The current version of Vuforia does not support camera autofocus with ARCore (which in turn DOES support autofocus, Vuforia just havent got to implement it yet). So I figured that I would install ARCore SDK alongside Vuforia and use the ARCore SDK to set the camer to autofocus mode. But creating the ARSession in the scene where Vuforia was used resulted in error. So I guess its not possible to bypass Vuforia.
     
  4. Abd92

    Abd92

    Joined:
    Jan 4, 2016
    Posts:
    5
    hi, thank you for this information,
    could you please tell me what changes did you make to the AndroidManifest.xml file in order to combine both SDKs
     
  5. Abd92

    Abd92

    Joined:
    Jan 4, 2016
    Posts:
    5
  6. LearningM

    LearningM

    Joined:
    Aug 31, 2018
    Posts:
    4
    Vuforia seems to integrate arcore with it's own implementation, I can't get the sdk component from arcore. Similar to your test, creating the ARSession in the scene where enables Vuforia support leads to error. So far I have no idea how to integrate them and get the component from arcore.
     
  7. LearningM

    LearningM

    Joined:
    Aug 31, 2018
    Posts:
    4
  8. Abd92

    Abd92

    Joined:
    Jan 4, 2016
    Posts:
    5
    How about combine both SDKs in the same projects but in two different scenes as you did>?
    What changes should be done in the Android Manifest file