Intermediate: How to Integrate APM Service in Unity Game Development

Shiddalingeshwar M S
4 min readMar 5, 2021

Huawei AppGallery Connect provides Application Performance Management (APM) service provides app performance monitoring capabilities. You can view the analyze app performance data collected by APM in AG Console, this helps to understand the app performance quickly and accurately in real time to rectify app performance problems and continuously improve user experience.

Introduction

Huawei AppGallery Connect provides Application Performance Management (APM) service provides app performance monitoring capabilities. You can view the analyze app performance data collected by APM in AG Console, this helps to understand the app performance quickly and accurately in real time to rectify app performance problems and continuously improve user experience.

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

Integration Preparations

1. Create a project in AppGallery Connect.

2. Create Unity project.

3. Huawei HMS AGC Services to project.

4. Download and save the configuration file.

Add the agconnect-services.json file following directory Assests > Plugins > Android

5. Add the following plugin and dependencies in LaucherTemplate.

6. Add dependencies in build script repositories and all project repositories and class path in BaseProjectTemplate.

7. Create Empty Game object rename to GameManager, UI canvas texts and button and assign onclick events to respective text and button as shown below.

8. Click to Build apk, choose File > Build settings > Build to Build and Run, choose File > Build settings > Build And Run.

Result

To view AppGallery Connect analysis choose Quality > APM

Tips and Tricks

  • Add agconnect-services.json file without fail.
  • Make sure dependencies added in build files.
  • Make sure that you that APM Service enabled.

Conclusion

In this article, we have learnt integration of Huawei Application Performance Management (APM) Service into Unity Game development using official plugin. Conclusion is APM helps us to rectify quickly and accurately app performance and continuously improve user experience.

Thank you so much for reading article, I hope this article helps you.

Reference

Unity Manual

Service Introduction official documentation

Forum link

--

--