Unity Ugui Text font size has a huge impact on performance

Source: Internet
Author: User

The Font size has a very large effect on the performance of Ugui text.

"Cube Duck Run" test on the ITOUCH5 is very smooth, but on the iphone5 test, after the game over to show the history of the highest tick but always card for several seconds, resulting in a very poor game experience. Using the shielding method for two days finally found the cause of the problem, the original display history of the highest score text font size set to 150. In fact, the font size of 50 is enough, but because the text of the parent node has a 0.3 times-fold scale, so that the text font size is set to 150 its size on the screen will look appropriate, the original editing interface when only "look right", Without realizing the performance hazards of doing so. So the parent node scale from 0.3 to 1, and then the text of the font size to 50, and then the test will not be stuck.

----Supplement:

The above accident leads to the principle that if a node on the UI tree is not a non-terminal node, it must be guaranteed that its scale value is (1,1,1).

Assuming that the above principle is not adhered to, which is accidentally in a scale not for (1,1,1) node or its descendants of the node to add a text child node, resulting in the program card into a dog and can not think of what caused, it is tragic.

Unity Ugui Text font size has a huge impact on performance

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.