当前位置:网站首页>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.
边栏推荐
- Debezium series: when there are a large number of DML operations in the record source database, the debezium consumption data time lags behind the data generation time by several hours
- LVGL 8.2 Span
- GBase 8a 关于No Suitable Driver 问题
- Introduction to computing system hardware (common servers)
- Sudden! Britain accuses Huawei of major defects in its equipment (with report)
- Custom dialog (including header and footer)
- What tools are available to connect and manage polardb for PostgreSQL databases?
- Opencv4.5.x+cuda11.0.x source code compilation and yolov5 acceleration tutorial!
- Spirng security (VIII) multiple filter chains coexist
- # 1. Excel的IF函数
猜你喜欢

LVGL 8.2 Span

Properties of trees

Dark king | analysis of zego low illumination image enhancement technology

RGB and SATA function switching module based on Quanzhi rk3568j

ThreadLocal Kills 11 consecutive questions

Docker install MySQL 5.7

Application of AI in testing

Analytic hierarchy process of MATLAB

Creativity: Modern Art anonymous oil painting AI works presentation

Network engineering case: integrated network design of CII company
随机推荐
Introduction to computing system hardware (common servers)
After the failure of listing in Hong Kong, tuba rabbit terminated its gem IPO, and the founder responded
TS learning (VII): interface and type compatibility of TS
Dry goods | Ctrip Hongmeng application development practice
Function and technical principle of data desensitization [detailed explanation]
Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi
自然的状态最好
Wechat applet experiment case: simple idiom dictionary
Oracle uses FY_ recover_ Data recover truncate deleted data
Impala2.12 environmental installation
开源之夏专访|“00 后” PMC member 白泽平
Method of setting document comments in idea (graphic version)
The LAF protocol elephant of defi 2.0 may be one of the few profit-making means in your bear market
数据湖(十六):Structured Streaming实时写入Iceberg
Press the switch for the minimum number of times to turn on all lights
When the development of the meta universe begins to show more and more the style of the Internet, we need to be vigilant
Grafana visual configuration diagram histogram
Creativity: Modern Art anonymous oil painting AI works presentation
Hbuilderx eslint configuration
Wechat applet application development (I)