Unity learning Summary 4-ngui performance issues

Source: Internet
Author: User

Silence for a long time, busy for a long time, starting from the beginning is still trying to find excuses for failing to make a good summary and thinking. To sum up, time can still be drawn out. Recently, the accumulation of pitfalls seems to be almost enough. This is also equivalent to leaving more attention to solving problems in the future. I hope you can help me to point out the inaccuracy and errors in many places.

1. The uiscrollview of the scrolling component has low performance:

We implement a scroll screen for the element of the belt node. The components in the brackets are not mandatory. If you want to implement a click event, you have to mount the button script on the uidragscrollview node. The reason why I drew the structure is that I did a lot of "repetitive" tasks in the scripts that seem to have different functions in uiscrollview and uidragscrollview. Uiscrollview contains nested onpress and ondrag event calls, which are not a problem. To achieve the drag effect, some subsequent processes are added to the lateupdate of uiscrollview, including re-tuning ondrag, so that if we add the ondragfinish event of uiscrollview, the event will be executed twice. In addition, the call in lateupdate has a significant delay. The interval between the two ondragfinish events is longer. I personally do not need to "drag" The effect, I will put the ondrag in lateupdate

Remove. No bugs have been found.


2. Bug of ondragscrollview:

In the same way, we can implement a page flip screen. However, the general design is that the uidragscrollview component is one page. But what if I have multiple uidragscrollviews on each page? The range of coordinates controlled by each element is not enough. In this case, you cannot directly flip the page in full screen .. For example, in moverelative mode, it directly becomes invalid. In the end, it is forced to specify the elements on the top and bottom pages. So there are still a lot of imperfections in ngui, waiting for us to discover and gradually optimize it.



22:07:55

Unity learning Summary 4-ngui performance issues

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.