Unity3d GUI Automatic Layout

Source: Internet
Author: User

The GUI mode adopted by unity is the instant mode, which is quite different from the message-based mode similar to Windows. It is very convenient to use the guilayout class in Gui layout. However, it should be noted that the ongui function execution cycle is faster than update. That is to say, one frame may be called multiple times, for example, each mouse event will be called once, therefore, reduce the number of operations in the ongui function as much as possible. Improve efficiency. Guilayout works with guilayoututility. when getlastrect () is used to obtain the coordinates of the layout space on the screen, note that if it is not in the event. current. when type is not a repaint event, the obtained rectangular area is (,). If this is ignoredCodeThis may cause inexplicable errors.

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.