Unity3d Animation callback method

Source: Internet
Author: User



Welcome to Unity Learning,Unity Training,UnityEnterprise TrainingEducation Area, there are manyu3d Resources,u3d Training Video,u3d Tutorials,U3d Frequently Asked questions,u3d Project Source code, the "Dog Planing Learning Network" Unity's Ultimate Academy, dedicated to building the industryUnity3dTraining, learning the first brand. A lot of coder have been discovered recently. When you develop a game with unity, you need a need. The animation is going to do something when it comes to a frame. And hopefully we can get a callback.There's a Window menu in unity. Animation tool. Open it. You will then see the following interface ... Select the model animation in your game. Then the animation will be displayed.The Red Spot is where the event is inserted. You can use your mouse to click on the time there will be a red line. Then click the Red button to display the following window:Select the script function on the model to run it. Here is a dojump function in my script Test2. And then I'll go to the frame and I'll call back the function. I can do what I want to do.the script is on the animation.source code for TEST2:


    • Using Unityengine;
    • Using System.Collections;

    • public class Test2:monobehaviour {
    • void Dojump ()
    • {
    • Print ("jump!");
    • }
    • }


After that, the jump will be output!...For more information, please visit the "Dog Planing Learning Network" Unity Ultimate Academy Http://unity.gopedu.com
Statement: This document comes from the "Dog Planing Learning Network" Community-unity Extreme College, is a self-published Unity3d study articles, if anything violates your relevant interests, please communicate with the official, we will deal with the real-time.



Unity3d Animation callback method

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.