using UnityEngine;
using System.Collections; public class Try : MonoBehaviour { public class Action : ScriptableObject
{
public Transform Att;
public Transform Def;
} // Use this for initialization
void Start () {
Action act = new Action();
act.Att = this.transform;
act.Def = this.transform; AnimationEvent evt = new AnimationEvent();
evt.time = 0;
evt.functionName = "Test";
evt.objectReferenceParameter = act as Object;
animation.GetClip("ani").AddEvent(evt); Debug.Log(act.Att.gameObject.name);
} public void Test(Action obj) {
Action act = obj as Action;
Debug.Log(act.Att.gameObject.name);
}
}

貌似参数传多少个,类型为int float object都可以

http://blog.csdn.net/damenhanter/article/details/52561673

最新文章

  1. C#装箱和拆箱
  2. C#设计模式——单件模式
  3. SpringMVC 架构
  4. c/c++ main函数执行之前/后
  5. JS浏览器对象-window对象
  6. Hadoop学习笔记01——Hadoop分布式文件系统
  7. 【学习opencv第六篇】图像的反转操作
  8. Android重构篇——项目架构篇
  9. [BZOJ]4405: [wc2016]挑战NPC(带花树)
  10. Cross-Origin跨域问题
  11. vue 打开新窗口
  12. 如何在Windows命令行(DOS界面)中调用 编译器 来编译C/C++源程序
  13. 用ActiveX 创建自己的comboBox 控件(一)
  14. MySQL5.7 多实例
  15. springboot 错误处理
  16. Vue SSR的渲染性能
  17. TypeError: HashUpdate fail
  18. macbook下 go 语言的 helloworld
  19. ubuntu16.04 eclipse+pydev 配置
  20. BigData:值得了解的十大数据发展趋势

热门文章

  1. (*)(转)要快速学习SSM框架,你需要一套学习曲线平滑的教程
  2. .idea文件夹是干嘛的
  3. [2018-05-27]配置VSTS认证方式使用Personal Access Token
  4. 基于node开发的web应用,负载均衡的简单实践
  5. Spring Boot2.0之 yml的使用
  6. Winfrom和控制台中static修饰方法的问题
  7. 51nod 1537
  8. Spark- Spark Yarn模式下跑yarn-client无法初始化SparkConext,Over usage of virtual memory
  9. 单页导航菜单视觉设计HTML模板
  10. 一次php脚本出现段错误(Segment fault)的经历