Learning how to get your first game on to AppGallery using Huawei’s new Unity Plugin 2.0

Dima Zangana
5 min readSep 24, 2021

Introduction:

This article has been written based on the previous live-streamed event on August 25th, 2021.

YouTube live stream link: https://www.youtube.com/watch?v=idPcUxrNcXE

This article will touch upon the content of the video and demonstrate how to integrate the non-integrated Unity project to become an integrated version following the GitHub repositories available:

Example Projects / GitHub Repositories:

Below are two links to the GitHub repositories. If you’d like to practice, download the non-integrated project first and then follow the rest of this article to understand how to integrate the non-integrated project into the integrated project.

Non-Integrated GitHub Project (Helicopter Game)

Integrated GitHub Project (Helicopter Game)

What is the Unity Plugin 2.0?

The Unity Plugin 2.0 version of the plugin has been created for the purpose of simplicity, to allow developers of all backgrounds such as junior developers to implement HMS services into their Unity projects. The plugin has been created in a way that reduces time significantly in the integration process in comparison to the previous version.

Why use Unity Plugin 2.0?

Based on its simplicity of using the plugin, this plugin is now the best thing out there for your Unity project to get integrated into Huawei AppGallery.

  • Reduced integration time and risk of integration issues.
  • Minimal lines of codes, almost codeless development experience.
  • Added a new custom Unity editor user interface for easy implementations. of kits that are aimed to help developers who are new to the process.
  • Optimized and has support for the latest HMS kit version by simply clicking ‘Check for Updates’ in Unity.
  • Gradle builds for a smooth procedure.
  • Removed library files inside Unity project.

Want to learn how to use the Plugin?

Feel free to watch the YouTube video to learn how to integrate your game or the non-integrated project, or if you prefer a text-based learning environment where you can learn the general way of how to learn the plugin, then please go ahead and look at my other article:

Learning Huawei’s Unity Plugin 2.0 for your Unity Project

1. Process Overview of Huawei’s Unity Plugin 2.0

You will first need to download and import the Unity plugin to your Unity project: Downloading and Importing the Unity Plugin 2.0 Link to GitHub for Plugin 2.0

Requirements must be set in your Unity Editor before proceeding to use the plugin:

  • The package name must match your AppGallery Connect Project package name: Eg. com.testproject.huawei
  • The minimum API level must be 21 or above.
  • Your API compatibility level must be set to .NET 4.x.
  • KeyStore file created and SHA-256 used on AGC Project.

2. Showcasing the Features in Unity

In the Unity Editor, head to your tab at the top of your screen and click: Huawei > Kit Settings

Optional: Under the Huawei menu, you will also find a ‘Check for Updates’ button which is good to consider as the plugin is constantly in development and frequently bringing out new updates, fixing bugs, etc.

You will now be prompted with all the kits available that allow you to enable and disable to your choice.

3. AppGallery Connect Services (AGC)

At this point now that you have all the Unity-based requirements done, you will now need to actually head to Huawei’s Developer portal where you can then create your first project and application on Huawei AppGallery Connect.

Assuming you have created a developer account at: Huawei Developers, you will now need to follow the steps below which can also be found at EvilMindDev’s instructions page:

During this step, you will create an app in AppGallery Connect (AGC) of HUAWEI Developer. When creating the app, you will need to enter the app name, app category, default language, and signing certificate fingerprint. After the app has been created, you will be able to obtain the basic configurations for the app, for example, the app ID and the CPID.

  1. Sign in to Huawei Developer and click Console.
  2. Click the under Ecosystem services, click on App Services.
  3. Click on the AppGallery Connect under Distribution and Promotion.
  4. Click My Apps.
  5. On the displayed My apps page, click New app on the top right.
  6. Enter the App name, select App category (Game), and select Default language as needed.
  7. Upon successful app creation, the App information page will automatically display. There you can find the App ID that is assigned by the system to your app.

4. Conclusion

Assuming you have made it this far, I would now recommend at this point to switch over to the video and skip to the actual technical parts where IAP’s are created, etc. I also recommend checking out these links below that can be very helpful:

Here’s a 3 part tutorial from Muhammed Enes Simsek:

Here’s from Samet Güzel:

Here’s from Yusuf Altun:

--

--