C # Invoke method

Source: Internet
Author: User

Leave a spare, specifically as follows:

The Invoke () method is a delegation mechanism of u3d;
1, it can be called in the life cycle of the script (Start, Update, Ongui, Fixedupdate, lateupdate).

2. The Invoke () method cannot accept methods that contain parameters.

3, when time.scaletime=0, Invoke () is invalid, because it will not be called to.

Usage:

Invoke ("Method name", Float:time),//time seconds, then call method named "Method name".

Invokerepeating ("Method name", float:time1,float:time2),//time1 seconds after calling the method named "Method name", after time2 seconds to call this method again.

Canceinvoke (string: "MethodName") all calls called MethodName.
Canceinvoke () Cancels all invoke calls in this script

C # Invoke method

Related Article

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.