Skip to main content

ARCore Sample App (Tutorial)

Create a new project and import the SDK

  1. Open Unity Hub and create a new 3D project.
  2. For Unity 2019 only: Select Window > Package Manager and install the following packages:
    • Multiplayer HLAPI (required by the CloudAnchors sample)
    • XR Legacy Input Helpers (required by Instant Preview, which uses the TrackedPoseDriver)
  3. Import the ARCore SDK for Unity:
    1. Select Assets > Import Package > Custom Package.
    2. Select the arcore-unity-sdk-1.14.0.unitypackage that you downloaded.
    3. In the Importing Package dialog, make sure that all package options are selected and click Import.

Open the sample scene

  1. In the Unity Project window, you can find the HelloAR sample in:
    Assets/GoogleARCore/Examples/HelloAR/Scenes/.

Configure project settings

  1. Go to File > Build Settings to open the Build Settings window.
  2. Select Android and click Switch Platform.
  3. In the Build Settings window, click Player Settings.
  4. In the Settings window, configure the following:
    SettingValue
    Player Settings > Other Settings > RenderingUncheck Auto Graphics API
    If Vulkan is listed under Graphics APIs, remove it.
    Player Settings > Other Settings > Package NameCreate a unique app ID using a Java package name format.
    For example, use com.example.helloAR
    Player Settings > Other Settings > Minimum API LevelAndroid 7.0 'Nougat' (API Level 24) or higher
    (For AR Optional apps, the Minimum API level is 14.)
    Player Settings > XR Settings > ARCore SupportedEnable

Build and run the sample app


  1. Connect your device to your development machine.
  2. In the Unity Build Settings window, click Build and Run.
    Unity builds your project into an Android APK, installs it on your device, and launches it.
  3. Move your device around until ARCore starts detecting and visualizing planes.
  4. Tap a plane to put an Andy Android object on it.
CODE :

loading...


Comments

Post a Comment

Popular posts from this blog

Unity XR platform

Unity XR plugin framework We have been working to improve our multi-platform offering, enabling direct integrations through a unified plugin framework. The resulting tech stack consists of an API that exposes common functionalities across our supported platforms in a frictionless way for creators while enabling XR hardware and software providers to develop their own Unity plugins. This architecture offers the following benefits: Multi-platform developer tools such as AR Foundation and the XR Interaction Toolkit  Faster partner updates from supported plugins via the Unity Package Manager  More platforms have access to an interface to leverage Unity’s XR rendering optimizations and developer tools Unity has developed new XR plugins for our supported platforms as part of this shift. Additionally, we have deprecated our built-in platform implementations in 2019.3.  This framework will influence how we support various types of platforms: Officially supported platforms