Create a new project and import the SDK
- Open Unity Hub and create a new 3D project.
- 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
)
- Import the ARCore SDK for Unity:
- Select Assets > Import Package > Custom Package.
- Select the
arcore-unity-sdk-1.14.0.unitypackage
that you downloaded. - In the Importing Package dialog, make sure that all package options are selected and click Import.
Open the sample scene
- In the Unity Project window, you can find the HelloAR sample in:
Assets/GoogleARCore/Examples/HelloAR/Scenes/
.
Configure project settings
- Go to File > Build Settings to open the Build Settings window.
- Select Android and click Switch Platform.
- In the Build Settings window, click Player Settings.
- In the Settings window, configure the following:
Setting Value Player Settings > Other Settings > Rendering Uncheck Auto Graphics API
If Vulkan is listed under Graphics APIs, remove it.Player Settings > Other Settings > Package Name Create a unique app ID using a Java package name format.
For example, usecom.
example. helloAR Player Settings > Other Settings > Minimum API Level Android 7.0 'Nougat' (API Level 24) or higher
(For AR Optional apps, the Minimum API level is 14.)Player Settings > XR Settings > ARCore Supported Enable
Build and run the sample app
- Enable developer options and USB debugging on your device.
- Connect your device to your development machine.
- 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. - Move your device around until ARCore starts detecting and visualizing planes.
- Tap a plane to put an Andy Android object on it.
CODE :
loading...
Awesome Thanks for the information
ReplyDelete