Guides & References

Getting Started

Development Environment

  • minSdkVersion: 26 or later

  • targetSdkVersion: 33 (recommended)

  • compileSdkVersion: 33 (recommended)

Enable androidX

The 3D modeling kit requires Android X to be activated. Follow the steps to activate Android X.

  • Enable gradleTemplate.properties

  • Add these lines

android.useAndroidX = true
android.enableJetifier = true

Adding Permissions

To use the 3D modeling kit, declare the following permissions in the AndroidManifest.xml file:

  • First, enable the Main Manifest

  • Then add these lines:

<manifest
    ...
    <!-- Write texture map files to the storage and read data to be processed from the storage. -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <!-- Connect to the Internet for uploading images or downloading texture maps. -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    ...
    <application>

Enable 3D Modeling Kit

  • From AppGallery console project settings:

  • From plugin:

Disable App Combat Library

To address problems related to duplicate classes, disabling the App Combat library is recommended.

Set your API Key

Get your API key from

  • agconnect-services.json or

  • AppGallery Console > projects > your project > project information

Then fill Unity > Huawei > Kit Settings > 3D Modeling Kit tab > KeyAPI. Then click save.

Usage of Demo Scenes

Modeling Demo

1- Build the game with the Demo scene.

2- Take pictures of the object. 20 to 200 (50 to 200 images are recommended.)

3- Move images to a specific path. Such as Android>data>{yourpackage}>files

4- In the scene click the Upload Model File button. Then select the folder. This will start the upload process.

4a- If you are having problems with this part. The problem may be that location permission is not granted in your application. To solve this, you can try to give it manually from your phone's settings>applications>{Your Game} section.

5- Click the Task List button to view your current task status.

Last updated