Search Unity

Requesting ARCore APK Installation with ARFoundation

Discussion in 'AR' started by Robin_Gamedia, May 10, 2019.

  1. Robin_Gamedia

    Robin_Gamedia

    Joined:
    Feb 8, 2017
    Posts:
    6
    I'd like to request the ARCore APK installation from script. With ARCore, this is done by calling "Session.RequestApkInstallation(bool userRequested);". Is there a way to do this with ARFoundation too?
    Or should I just use the GoogleARCore one?
    I'd like to avoid having to add "using GoogleARCore;" to my script when I can have the same results with just the "using UnityEngine.XR.ARFoundation;".
     
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    ARFoundation will do this for you automatically (see ARSession.attemptUpdate). You can also invoke it manually with ARSubsystemManager.Install() though you should check the ARSubsystemManager.systemState first to check whether installation is required and supported.
     
    Robin_Gamedia likes this.
  3. Robin_Gamedia

    Robin_Gamedia

    Joined:
    Feb 8, 2017
    Posts:
    6