Integration of Huawei Services in Unity Part-2
In this article, we will learn how to integrate Huawei Cloud Functions. It enables serverless computing. It provides the Function as a Service (FaaS) capabilities to simplify and make ease app development and O&M. Hence provides means for quick implementation and build your app development and these services can be accessed from different platforms by function triggers using http to get computational result.

Introduction
In this article, we will learn how to integrate Huawei Cloud Functions. It enables serverless computing. It provides the Function as a Service (FaaS) capabilities to simplify and make ease app development and O&M. Hence provides means for quick implementation and build your app development and these services can be accessed from different platforms by function triggers using http to get computational result.
Main Functions
- Cloud Functions provides an efficient and reliable framework for developing and running functions. It frees you from complex traditional development and O&M of apps. Server configuration and management, code deployment, load balancing, autoscaling, and high reliability assurance are now streamlined. You only need to focus on service logic and function code to build reliable and scalable serverless apps.
- As the core of serverless computing, Cloud Functions works with other cloud services like building blocks to implement your service logic.
Development Overview
You need to install Unity software and I assume that you have prior knowledge about the unity and C#.
Hardware Requirements
- A computer (desktop or laptop) running Windows 10.
- A Huawei phone (with the USB cable), which is used for debugging.
Software Requirements
- Java JDK installation package.
- Unity software installed.
- Visual Studio/Code installed.
- HMS Core (APK) 4.X or later.
Integration Preparations
1. Create a project in AppGallery Connect.
2. Create Unity project.
3. Adding Huawei HMS AGC Services to project.
4. Switch platform for android and enable custom build




5. Generate a SHA-256 certificate fingerprint.
To generating SHA-256 certificate fingerprint use below command.

6. Configure the signing certificate fingerprint.

7. Download and save the configuration file.

Add the agconnect-services.json file under Assests > Plugins > Android
8. Add the following plugin and dependencies in LaucherTemplate
9. Add the following dependencies in MainTemplate.
10. Add dependencies in build script repositories and all project repositories & class path in BaseProjectTemplate.
Let’s start coding
Result




Tips and Tricks
- Add agconnect-services.json file without fail.
- Add SHA-256 fingerprint without fail.
- Make sure dependencies added in build files.
- Makes sure service is enabled.
- Make sure use test function in agc to verify function test response and input.
Conclusion
In this article, we have learnt integration of Huawei Cloud Functions into Unity Game development. It enables serverless computing. It provides the Function as a Service (FaaS) capabilities to simplify and make ease app development and O&M. Huawei Crash Service makes easier to find the crashes and helps you to make application crash free. Crash services also allows you to report custom key. You can make use of these services as per your requirement in the application.
Thank you so much for reading this article, hope this article helps you, please provide likes and comments.
References