2 / 984/ /1

“Unity Mobile Game Performance Optimization Series” starts from some basic discussions on Unity mobile game optimization, exemplifies and analyzes some of the most common performance problems in mobile game projects developed with Unity in recent years, and shows how to identify and resolve these issues by using UWA’s game performance monitoring tools. The content includes the basic logic of performance optimization, UWA performance detection tools, and common performance problems, hoping to provide Unity developers with more efficient R&D methods and practical experience.


Today I would like to introduce the first part to you, which consists of five subsections.

  • Game performance in the vision of players
  • Game performance that developers care about
  • How to identify the problem
  • How to fix the problem
  • How to continuously monitor performance

1. Game performance in the vision of players

Any player will encounter similar questions when playing the game: Why does the game crash after I play for a while? Why is my game so laggy? Why is my phone so hot? Why is my phone battery draining so fast?

For players, it has nothing to do with whether the art of the game itself is excellent and whether the gameplay is interesting. When these questions arise, the game experience will naturally deteriorate, and it will inevitably lead to a decrease in stickiness. This is a result that every game developer does not want to see.

The truth is that for the mobile game market we are focusing on today, the performance of various hardware models on the domestic market has a wide range; if the project wants to support a bigger market, the performance pressure that the project has to bear is often greater. So, how to let players with different hardware devices, especially those who have access to our game projects through mid-to-low-end devices, can also experience the game content smoothly and smoothly, which is one of our main goals.


2. Game performance that developers care about

In the development process of game projects, a very common phenomenon is: for a small-scale or inexperienced development team, in the middle and early stages of a new project, they often put all their energy into implementing functions, while ignoring performance optimization. After testing in the middle and late stages of the game, or even near the launch, it was discovered that the project was filled with a large number of serious performance problems, which affected the normal experience of the game, but they didn’t know where to start optimizing the game performance, and the time was very embarrassing. It is enough to see that performance issues are an important lifeline for a game project. Developers need to establish a good sense of optimization and optimize the knowledge system so that the project can avoid detours.

Different from the player’s perspective, UWA believes that from the perspective of developers, it should be mainly divided into three categories: memory, CPU and GPU. question. The main content of this article aims to exemplify and discuss common and typical problems in these three categories, so as to form an overview of mobile game performance optimization.

Then, since several performance problems have been found, how troubleshooting and solving the problem have become the two most critical steps.

3. How to identify the problem

The first major step after a performance problem is discovered is to identify the cause.

For example, when our game project runs for a long time, it will crash. Is it because our caching strategy is not done well or there is redundancy, which leads to the crash caused by the continuous increase of memory? Or is it because of the poor memory control of our art resources that a few larger resources can easily expand the overall memory?

Or maybe we found that a game scene is seriously stuck and the frame rate is very low. Is it because the number of rendered patches and DrawCalls on the same screen is too high, which leads to high pressure on the rendering module? Or is it time-consuming to update because the UI here is too complex and changes frequently?

Or maybe we feel that the phone in our hand is surprisingly hot, is it because the GPU pressure in the current scene is too high? Are our bandwidth, Shader complexity, Overdraw, post-processing, etc. not well controlled? The grading strategy we are doing on the current aircraft is not appropriate?

These are just a few of the myriad performance issues that crop up in endless steam. Some of the more common problems are discussed in detail later. In conclusion, the work of identifying the problem is itself a challenge.


3.1 Knowledge of computer language/graphics/game engine

Knowledge and experience are undoubtedly the most valuable weapons for a developer when optimizing project performance. Continuous learning and updating is also the process for every programmer to arm himself with. Perfect and full knowledge is not only conducive to identifying problems but also helping to solve problems. I put it here because it is an important prerequisite for our ability to start optimization work.

In addition to viewing the source code and documentation of various tools, tracking tool updates, reading books written by professional game developers, browsing various technical forums and blogs, etc., you can also find a lot of high-quality content in UWA’s technical community.

UWA Academy: Continue to update various high-quality courses, from the introduction and use of some development tools to the detailed explanation of the mechanism and principle of an engine module; from the latest mobile game technology practice to the case explanation of boutique projects, etc. It also invited many industry leaders and partners of famous game companies with many years of experience in the industry to write articles, covering a wide range and high quality. There is also excellent content from the UWA DAY Game Developers Conference hosted by UWA Shanghai Technology company every year.

UWA Q&A: Helping developers find better answers. It is a good platform for game developers to communicate and exchange technical issues on a daily basis. Here you can discuss or answer any questions you have about all aspects of game production. Through the most direct technical exchanges to avoid detours and gain field-proven development experience, the process of identifying and solving problems is much easier.

UWA open source library: Helping developers discover better solutions. Open-source projects from various sources are continuously updated and integrated, the complete translation, the classification is clear, and the pictures and texts are abundant, providing developers with a more convenient channel to search, discover and obtain open-source resources.

UWA Blog: Contains various technical articles selected by UWA, UWA Academy high-quality content update notification, integrates Q&A with high-quality questions, introduces UWA products and their updates, and other UWA community trends.


3.2 A variety of auxiliary tools

Workers must first sharpen their tools if they want to do well. Using tools to obtain direct and accurate performance data can more intuitively reflect performance bottlenecks, so as to achieve multiplier effects with half the effort.

With the development and maturity of the industry, major engine, IDE and hardware manufacturers have launched and updated their own performance analysis tools, and many developers or teams like to develop their own performance monitoring plug-ins according to their own projects.

As far as the engine is concerned, the Unity Profiler is a tool that many developers use and is using. It can record and view the real-time consumption parameters of various modules such as CPU/rendering/memory. A similar feature is already available in Unreal 4.

In terms of IDE, Windows, MAC OS/iOS, and Andriod platforms all have applicable tools, such as Visual Studio’s performance profiler, XCode’s Instruments, and Android Studio’s Profiler.

In terms of hardware, there are more types such as SnapDragon Profiler, XCode Metal Frame Capture, Mali Graphics Debugger, etc., so I won’t go into details.

All in all, according to the developer’s proficiency, the compatibility of different hardware platforms, the coverage of tool functions, and other factors, it is easy for developers to pick and choose suitable performance optimization aids.


3.3 UWA tool

So is there an easy-to-use, highly compatible, and comprehensive performance optimization assistant tool?

Of course, there is-The UWA GOT Online tool can be quickly integrated into the test project through the SDK provided by UWA. After the test process is completed on the real device, the data upload and analysis can be completed in a very short time, thereby automatically generating a series of visual charts. At the same time, it is also based on UWA’s rich optimization experience and huge database for scoring and provides targeted analysis suggestions and changes in performance parameters according to each performance module.

Not only that, but UWA also provides other in-depth optimization services to meet the optimization needs of developers from different dimensions.


4. How to solve the problem

The second big step in performance is problem-solving. With the support of knowledge and experience and the above tools, the more complex our project is and the later stage, the more we will face a long list of optimization problems. Properly planning and shortening this list in a limited time is our next challenge.


4.1 Prioritization of optimization work

Before the specific optimization work, reasonable planning can often save a lot of overall time.

The first point of planning work is to grasp the main contradiction of the problem. In a long optimization list, it is often impractical to optimize each item in the sequence. At this point, the list needs to be reorganized, reordered by priority, and more invested in optimizing problems that are more cost-effective.

For the judgment of priority, UWA believes that there are two main points of reference: First, the importance. If a problem has a far greater impact on the performance pressure of the current scene than other factors, it is obviously the main contradiction. If it is not corrected, it is difficult to maintain a normal game experience. Then you should invest more manpower and time to focus on solving it first; The second is the ease of operation if the performance pressure caused by a problem is relatively small, but it is just a little effort, such as just turning off a switch in the engine settings, it should be changed first.


4.2 Trade-off between performance and effect

The second point is a trade-off. The optimization of resources and rendering often affects the performance of the game. To this end, programmers often need to strengthen communication with planning and art colleagues to find a balance between the two. This balance is a dynamic balance and needs to be operated in combination with the actual situation. For example, a PUBG game has frequent screen changes and requires smooth combat operations, so the performance requirements can be lower; while a simulation game uses exquisite characters as its selling point, its models and animations need to be very delicate, while sacrificing some performance. Even in the same game, you can focus on performance in cutscenes and character display interfaces, while focusing on performance in battle scenes requires specific analysis of specific issues.

In general, the ultimate goal of the optimization of game projects is to run smoothly on the player’s hardware and give up a large part of the performance effect for this, which is also the actual choice of most development teams.


4.3 Classification strategy and setting standards
The third point, achieving the above balance on each type of aircraft is our classification strategy. We can turn on post-processing and use high-resolution models on high-end and even flagship models, but use a different set of standards on mid-to-low-end models.

Developing a grading strategy also requires us to adjust according to the type of project. The more detailed and accurate classification should also refer to the hardware models of the target market of the project and the classification experience of similar games. For details, please refer to the article “UWA Performance Standard System Based on Mobile Device Computing Power”.

In addition, the development team should also preferably specify a set of detailed and reasonable standards to manage and constrain the entire development process. The most common is to specify art resource standards, thus greatly avoiding memory problems. Unity also provides a callback function to perform normalization settings when resources are imported.


4.4 UWA suggestions

After the planning is completed, the specific optimization work comes. It’s a tedious job and requires patience, and UWA is happy to help along the way:

You can certainly look for ways in the UWA community, or find solutions in the automated reporting of UWA tools. You can also contact UWA staff to provide one-on-one explanation services for real-device test reports or further in-depth optimization services. UWA’s engine technical team will make more detailed diagnosis and suggestions for game projects.


5. How to continuously monitor performance

After taking the first two steps of performance optimization, many development teams want or take the third step, which is the step of continuously monitoring performance. To this end, some teams have dedicated engine optimizers and try to develop their own DevOps tools. We think this is a manifestation of the “industrialization” trend of game development.

As the demand for high-quality games in China increases year by year, the game R&D team has a higher and higher demand for the “industrialization” of project R&D. In UWA’s view, the “industrialization” of game development can currently be divided into five dimensions: standardization, normalization, specialization, automation, and customization. In the past 2021, UWA has done a lot of work and accumulated a lot of experience in the above aspects.

In 2022, at the past 6th UWA DAY Game Development Technology Conference with the theme of game development hosted by UWA, UWA adhered to the theme of “going into the game to practice the industrialization of game development” and led the industry developers to review Excellent R&D concepts and practical experience in the industry and work with industry partners to build an open and win-win technology exchange ecosystem.

The content of this article is introduced here. For more content, you can go to the UWA Academy to read. The course will discuss some performance problems that often occur in current game projects from three dimensions: memory, CPU, and GPU.


That’s all for today’s sharing. Of course, life is boundless but knowing is boundless. In the long development cycle, these problems you see maybe just the tip of the iceberg. We have already prepared more technical topics on the UWA Q&A website, waiting for you to explore and share them together. You are welcome to join us, who love progress. Maybe your method can solve the urgent needs of others, and the “stone” of other mountains can also attack your “jade”.


UWA Website:

UWA Blogs:

UWA Product: 

Related Topics