当前位置:网站首页>Summary of UPR optimization suggestions of unity
Summary of UPR optimization suggestions of unity
2022-07-25 04:30:00 【Chen Yan will act】
Unity UPR Summary of optimization suggestions
- Average frame rate .
- ReservedMono Peak value (MB)
- Peak value of texture resource .
- Peak value of grid resources .
- The peak of animation resources .
- Draw Call Peak value .
- Tris Peak value ( Noodles )
- Camera Render The average time taken
- Shader CreateGPUProgram The average time taken
- ReservedUnity Peak value
- ReservedMono Peak value
- TexturesSize Peak value
- AnimationClipsSize Peak value
- MaterialCount Peak value
- SkinnedMesh mean value
open UPR The test report of , Select test Overview... From the left menu bar , You can see the interpretation of the report

Average frame rate .
Recommended values > 25 frame
UPR Optimization Suggestions
- see CPU Occupy Top function , Analyze and optimize from high to low .
- see GC Occupy Top function ,GC Is the main reason for most of the catons .
- Look at the performance loss caused by the script .
- Reduce the rendering resolution of the game , When the frame rate of the mobile phone is low , Reduce the number of pixels to be processed per frame .
ReservedMono Peak value (MB)
Project runtime Mono Managed heap memory managed and allocated .
Recommended values < 80 MB
UPR Optimization Suggestions
Unity The memory in the project is mainly occupied by static resources 、AssetBundle and Mono Heap memory consists of .
- Use UPR The resource detection tool detects project resources . Check whether the memory usage of resources is reasonable , And whether there is the problem of resource redundancy .
- see Mono Rationality of heap memory usage :ReservedMono Whether the peak exceeds UPR Recommended values ,ReservedMono Whether there is a continuous upward trend .
- Mono The usage of heap memory mainly comes from reading and parsing configuration files , Check the rationality of heap memory usage for configuration file read operations .
- see AssetBundle The presence in memory .
Peak value of texture resource .
Recommended values < 50 MB
UPR Optimization Suggestions
There are three main factors that determine the size of texture resources : The resolution of the 、 Format and Mipmap Open or not .
- Reduce resolution , according to Game When the camera is closest to the object , The maximum resolution is determined by the pixel size occupied by the object .
- Split the transparent channel (Alpha), Because the belt Alpha Channel mapping Unity Will default to RGBA Format .
- Adjust the compression format , Try to use the highest compression format supported by the current platform .
- Ban Mipmap.
- Enable Use Crunch Compression,Crunch yes Unity Latest supported compression formats , The compression ratio is very high .
Recommended UPR The resource detection tool detects project resources .
Peak value of grid resources .
Recommended values < 20 MB
UPR Optimization Suggestions
- Reduce vertices , On the premise that the artistic effect can be realized , The fewer vertices the better .
- Turn on Optimize Mesh Options .
Recommended UPR The resource detection tool detects project resources .
The peak of animation resources .
Recommended values < 15 MB
UPR Optimization Suggestions
- Reduce the animation length .
- Reduce the number of bones , Delete invalid bone points .
- Reduce keyframe density , And reduce imported redundant keyframes .
- Reduce animation accuracy , Reduce animation size .
Recommended UPR The resource detection tool detects project resources .
Draw Call Peak value .
Windows Terminal Draw Call The value may be too high , Please refer to the value on the mobile phone .
Recommended values < 250( Time )
UPR Optimization Suggestions
Use WinUpr To test , And record RenderDoc, coordination RenderDoc Graphics debugger , Perform graphics performance tuning .
- UI DrawCall It is suggested that the quantity should be limited to 15-40 Between ,UI DrawCall Too much or too little , Will increase the consumption of performance .
- View the of the rendered object DrawCall Whether the batch is correct .
Tris Peak value ( Noodles )
Recommended values < 200000( Noodles )
UPR Optimization Suggestions
- Check the rationality of the number of meshes it renders .
- Step up to Game Object The cutting force .
- Simplify the scene mesh .
Section details – Performance overview – CPU details :
Camera Render The average time taken
Recommended values No more than 15ms Frame ratio of > 95%
UPR Optimization Suggestions
stay "CPU > Function performance " On the page , see Camera.Render Performance details , It helps to quickly locate the performance bottleneck of the rendering module .
Shader CreateGPUProgram The average time taken
Recommended values < 20(ms)
UPR Optimization Suggestions
Recommended UPR The resource detection tool detects project resources .
see Shader Is there a problem of resource redundancy , The problem of repeated parsing should be avoided .
Section details – Performance overview – Memory details :

ReservedUnity Peak value
by Unity Memory allocation required by the engine's own logic , Including the memory occupation of each module management class , Serializing information 、WebStream、 Memory occupation of resources, etc .
Recommended values < 150(MB)
UPR Optimization Suggestions
- Check if there is AssetBundle Not cleaned up .
- Assetbundle When packing , If there is only one reference, it will not be set AssetbundleName. Reduce Assetbundle Number of documents .
- Use SerializedFile load Assetbundle After that , instant Unload.
- For occupancy WebStream The larger AssetBundle file , Use LoadFromCacheOrDownLoad or CreateFromFile To replace , About to unzip AssetBundle The data is stored locally Cache For use in .
- Analyze texture 、 The Internet 、 Animation 、 Memory consumption and performance bottleneck of resources such as audio and materials , Targeted optimization .
ReservedMono Peak value
Project runtime Mono Managed heap memory managed and allocated . For the vast majority based on Unity For engine development projects , except iOS Outside the platform , Its managed heap memory is composed of Mono Assigned and managed .
Recommended values < 80(MB)
UPR Optimization Suggestions
- Check if there is AssetBundle Not cleaned up .
- Assetbundle When packing , If there is only one reference, it will not be set AssetbundleName. Reduce Assetbundle Number of documents .
- Use SerializedFile load Assetbundle After that , instant Unload.
- For occupancy WebStream The larger AssetBundle file , Use LoadFromCacheOrDownLoad or CreateFromFile To replace , About to unzip AssetBundle The data is stored locally Cache For use in .
- Analyze texture 、 The Internet 、 Animation 、 Memory consumption and performance bottleneck of resources such as audio and materials , Targeted optimization .
TexturesSize Peak value
The peak value of texture resources in the project .
Recommended values < 50(MB)
UPR Optimization Suggestions
Recommended UPR The resource detection tool detects project resources .
There are three main factors that determine the size of texture resources : The resolution of the 、 Format and Mipmap Open or not .
- Reduce resolution , according to Game When the camera is closest to the object , The maximum resolution is determined by the pixel size occupied by the object .
- Split the transparent channel (Alpha), Because the belt Alpha Channel mapping Unity Will default to RGBA Format .
- Adjust the compression format , Try to use the highest compression format supported by the current platform .
- Ban Mipmap.
- Enable Use Crunch Compression,Crunch yes Unity Latest supported compression formats , The compression ratio is very high .
AnimationClipsSize Peak value
The project is running AnimationClipsSize Peak value .
Recommended values < 20(MB)
UPR Optimization Suggestions
Recommended UPR The resource detection tool detects project resources .
- Reduce the animation length .
- Reduce the number of bones , Delete invalid bone points .
- Reduce keyframe density , And reduce imported redundant keyframes .
- Reduce animation accuracy , Reduce animation size .
MaterialCount Peak value
The project is running Material Quantity peak .
Recommended values < 300( individual )
UPR Optimization Suggestions
Recommended UPR The resource detection tool detects project resources .
1.Material Too much will lead to an increase in rendering overhead .
2. about Instance Type redundancy Material resources , Use MaterialPropertyBlock To replace Material Attribute operation , You can save the cost of the entity object itself .
3. For non Instance Type redundancy Material, see AssetBundle Whether there are redundant resources in .
SkinnedMesh mean value
Recommended values < 50( individual )
UPR Optimization Suggestions
Recommended UPR The resource detection tool detects project resources .
- Reduce SkinnedMeshRenderer Number of components . If the model does not use bone animation in the game , Can be SkinnedMeshRenderer Replace the component with MeshRenderer.
- When importing models , You can choose not to import animation .
- Reduce use SkinnedMeshRenderer Of Mesh Number of vertices .
- Use GPU Skinning. Supported on the hardware platform and GPU With sufficient resources , Can be in Player Setting Enable GPU Skinning, Remove the skinning task from CPU Transferred to the GPU.
边栏推荐
- @Summary of ResponseBody annotation
- Unity 之 UPR优化建议汇总
- Student thinking vs workplace thinking
- Open source summer interview | "after 00" PMC member Bai Zeping
- 开源之夏专访|“00 后” PMC member 白泽平
- Construction of Seata multilingual system
- Beijing University of Posts and telecommunications | RIS assisted in-house multi robot communication system joint deep reinforcement learning
- Understand Huawei's 2018 financial report with one picture
- Debezium series: optimize cluster parameters and support personalized settings of debezium connector
- Project launch process of software testing technology
猜你喜欢

C language: string processing function

Wechat applet experiment case: simple idiom dictionary

Day008 select structure (switch statement)

Spirng security (VIII) multiple filter chains coexist

Infinite connection · infinite collaboration | the first global enterprise communication cloud conference WECC is coming

Dark king | analysis of zego low illumination image enhancement technology

Eve-ng lab simulator Cisco, H3C test host alias

Creativity: Modern Art anonymous oil painting AI works presentation

Internship in 2022

Simple understanding of RPC
随机推荐
@Summary of ResponseBody annotation
01 create project warehouse
Huawei | mlgoperf: ML boot inline for optimizing performance
TS learning (VII): interface and type compatibility of TS
Network engineering case: integrated network design of CII company
DNS domain name resolution
Penetration test target combat SQL injection getshell
LVGL 8.2 Tabview & Window
How many rows does PostgreSQL need to partition for each table?
Debezium series: in depth interpretation of important JMX indicators of debezium
Dig deep into data dividends, Intel and industry accelerate the implementation of digital economy
Bubble mart's market value evaporated by HK $21billion in seven days, which can't be sold in China, and its future at sea is uncertain
C language: Escape Character
C# 之 FileStream类介绍
开源之夏专访|“00 后” PMC member 白泽平
The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market
Understand Huawei's 2018 financial report with one picture
Introduction to computing system hardware (common servers)
LVGL 8.2 Tabview
Database design process