Latency of the destroy () method

Source: Internet
Author: User

In unity3d, the object. Destroy () method will destroy the passed parameter object, which will cause all references to this object to become null afterwards. However, this method is not executed immediately when it is called. In each frame, all calls to the destroy () method are delayed until all updates () of the current frame () after the call ends (before the real rendering), it is executed in a unified manner. The result is that the object is still available in the same method after destroy () is called, and true is returned for null tests on the object.

In addition, if the latency parameter is input when destroy () is called, destroy () will be executed after a fixed delay period.

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.