Mecanim动画系统:

  1. 导入模型与动画

  2. 编辑Avatar

  3. 编辑动画控制器


材质


预设


脚本

获取脚本组件:

GetComponent(脚本组件名称);


获取物体:

定义变量、Gameobject.Find("物体路径名称");、Gameobject.FindGameobjectsWithTag("标签名");


脚本时间控制:

当前时间 Time.time

上一帧所消耗的时间 Time.deltaTime

固定增量时间 Time.fixeTime

固定增量间隔时间 Time.fixedDeltaTime

平滑DeltaTime Time.smoothDeltaTime


Yield语句 yield WaitForSeconds(时间);


0到1的随机值:

Random.value


随机数范围:

Random.Range


消息传递函数:

GameObject.SendMessage:向自身的脚本中发送消息

GameObject.BroadcasMessage:向自身及子物体的脚本中发送消息

GameObject.SendMessageUpwards:向自身及父物体中发送消息


刚体组件Rigidbody

http://www.unitymanual.com/m/Script/index.htm


碰撞器组件Collider

http://www.unitymanual.com/m/Script/index.htm


关节组件Joint

http://www.unitymanual.com/m/Script/index.htm


粒子系统Particle System