內存需要關注項目以及閾值推薦:
Mono 堆內存:?? 影響GC 耗時, 存在泄露風險,控制在80M以下。?????
PSS????????????????? :?? 進程在RAM 中實際使用的空間地址大小??? 內存峰值控制在硬件總內存 0.5~0.6? 以下,閃退風險才低。中端機型 900M
Reserved Total: (Reserved Unity + GFX? + Fmod? + Mono? )PSS?? 內存大約高于 reserved total 2~300M。 2G 設備 Reserved total? 應在700M 以下。????
GFX 內存??????? : (紋理,mesh ,shader 等)顯卡驅動所反饋的內存分配到。
內存類型 |
|||
2G |
3G |
||
資源內存 |
Texture |
140M |
210M |
Mesh |
60M |
100M |
|
Shader |
40M |
60M |
|
Animation Clip |
40M |
60M |
|
Mono 堆內存 |
80M |
80M |
|
Lua 內存 |
100M |
100M |
函數(shù)耗時監(jiān)控:
需要關注部分:
Physics: Physics. Simulate? ? , FixedUpdate. PhysicFixed
Render:? Camera.Render
UGUI: Canvas.BuildBatch
Animation: MeshSkinning.Update? Animaters.Update
Cpu: Font.CacheFontForText,? LogStringToConsole
GPU: Gfx.WaitForRenderThread
推薦閾值:
函數(shù)類型 |
||
中端機型 | ||
GPU |
Gfx.WaitForPresentOnGfxThread |
0.1ms |
CPU |
Update.ScriptRunBehaviourUpdate |
4.5ms |
CPU |
Inl_UniversalRenderTotal |
7.0ms |
ParticleSystem |
ParticleSystem.Update |
0.2ms文章來源地址http://www.zghlxwxcb.cn/news/detail-731734.html |
CPU |
LogStringToConsole |
1.0ms |
Physics |
Physics.Simulate |
0.2ms |
UGUI |
Canvas.BuildBatch |
2.0ms |
Animation |
MeshSkinning.Update文章來源:http://www.zghlxwxcb.cn/news/detail-731734.html |
0.2ms |
到了這里,關于unity 性能優(yōu)化指標的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!