摘要: 遇到的问题:1 第11节Scripting the pressure plates中需要获取子物体的Animator组件,教程使用的语句如下:”SwitchAnim = GetComponentInChildren();“经测试,无法获取,产生了“Animator has not been initialized”的警告解决方法:直接查询子物体,然后在获取子物体的组件“SwitchAnim = gameObject.transform.GetChild(0).GetComponent();”原因:不明确,可能操作顺序上有问题,也有可能是版本问题,并且官方文档也保留着该函数的说明。教程是今年的, 阅读全文
posted @ 2014-04-11 00:10 nodegetout 阅读(555) 评论(1) 推荐(0) 编辑