All rights reserved, reprint must indicate the source!
like the fire shadow, like Java, like Unity3d, like game development can join mu ye cun q Group: 379076227
This week, some netizens mentioned the use of Ngui to fight blood, take the injury and other text performance is too poor. That's true, I've also found that UIPanel occupies a high CPU on the profile before (on the Android machine NGUI 3.8.2,1000 block).
So eventually in the fight floating the text this piece does not use Ngui, but creates the mesh itself to handle. The optimization on the phone before and after about 10 frames per second increased.
Look at the effect first.
You can see that Drawcall and Ngui are all 1.
This meshtext is the HUD text component I wrote myself.
The code is as follows:
----code is temporarily closed, sorry Friday will be public.
There should be no explanation for this code, mainly about triangular vertex calculations and UV computing. Find an article to create a mesh to read it should be able to understand.
Although the Ngui Atlas is used inside, rendering and updating are completely unrelated to Ngui.
If you want to change to an atlas without Ngui, you can. But at that time more lazy, already has the Atlas, directly take over to use slightly.
Do not want to use the Ngui Atlas can be modified by itself. This can be run out of Ngui.
The complete project (based on Unity3d 4.3.3 and NGUI3.8.2 test) will appear here after uploading.
Achieve efficient battle drift in Unity3d