阅读背景:

Unity之一天一个技术点(十五)

来源:互联网 

给unity3d的老版动画中,添加事件的办法(测试通过):

 
       AnimationEvent event0 = new AnimationEvent();
       event0.time =this.animation["run"].length * 0.2f;
       event0.functionName ="xxx";
       event0.stringParameter="哈哈!";
       animation["run"].clip.AddEvent(event0);

    public void xxx(string ss)
    {
        Debug.Log(ss);
    }       AnimationEv




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: