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); }
原文地址:http://blog.csdn.net/myk7694503/article/details/43486929