当前位置:网站首页>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.
边栏推荐
- Method of setting document comments in idea (graphic version)
- 数据湖(十六):Structured Streaming实时写入Iceberg
- Properties of trees
- MongoDB的安全认证详解
- If the development of the metauniverse still follows the development logic of the Internet, and its end point also follows
- Internship in 2022
- Sudden! Britain accuses Huawei of major defects in its equipment (with report)
- Best practice cases of data security in the medical industry (desensitization version)
- Eve-ng lab simulator Cisco, H3C test host alias
- Maker concept design to adapt to popular education
猜你喜欢

Digital collections can go further without hype

Construction of data center (I): background of the emergence of data center

Spire. Office for net 7.7.2 and news

盐粒和冰粒分不清

开源之夏专访|“00 后” PMC member 白泽平

Database design process

Method of setting document comments in idea (graphic version)

Apipost signs up with Chinatelecom! Work together to accelerate the digital transformation of enterprises

MongoDB的安全认证详解

Cannot make qopenglcontext current in a different thread: the solution to pyqt multithread crash
随机推荐
@Summary of ResponseBody annotation
开源之夏专访|“00 后” PMC member 白泽平
Math. Random, switch selection structure
读书的思考
Unity 之 UPR优化建议汇总
Hbuilderx eslint configuration
DNS domain name resolution
[golang from introduction to practice] stone scissors paper game
[internship] processing time
Server status code
What tools are available to connect and manage polardb for PostgreSQL databases?
After the failure of listing in Hong Kong, tuba rabbit terminated its gem IPO, and the founder responded
Apple airpower was forced to cancel its launch two years after it was launched! Uncover the reason!
@ResponseBody注解的总结
Implementation of some basic operation codes of string
Database design process
Jenkins continues to integrate entry to mastery
How to test cookies
Openharmony Mengxin contribution Guide
DIY can decorate the mall system, you can also have!