In unity, the process of preparing data each time the engine notifies the GPU is called a draw call. The lower the draw call value, the higher the rendering performance.
Ngui view draw tool (ngui-open-draw call tool)
NguiAspectDraw callOptimization:
(1)Package Gallery
1. drawcall is generated for rendering of each material/texture. This drawcall can only be optimized by packing the gallery.
Ii. Division from the functional perspective. For example, the UI can be divided into public parts, and each specific interface can be packaged with closely related images on the display.
(2)Rendering sequence
1. U3D rendering is ordered. The ngui Rendering sequence is controlled by us. You can control the ngui Rendering sequence so that you can control drawcall.
2. A drawcall indicates that U3D uses this material/texture for a rendering. This rendering assumes that there are three objects, when all three objects use this material or texture, A drawcall is generated. Assuming that three objects use different materials/textures, three drawcalls are generated.
Example:
A, BUse Material1, CUse Material2,There will be severalDraw call?
There are two situations,3ItemsDraw call:
A:Material1
B:Material2
C:Material1
Case 2,2ItemsDrawcall
A:Material1
C:Material1
B:Material2
Rendering sequence:UnityBy defaultDepthTo render. After rendering, controls with the same material will be merged into oneDraw call. If it is different from the previous material, a new one will be generated.Draw call. So there will be two different results above. If there is more space on the same interface, this problem will become more obvious. InUIPay special attention to this point during production.
3. ngui draw call (rendering call)