找回密码
 立即注册
楼主: 1055587332

[常见问题] 求助啊

[复制链接]
发表于 2013-3-17 16:30 | 显示全部楼层 |阅读模式
var camera : Component;
camera = GameObject.Find("Camera").GetComponent(Camera_LookAt);
var rotationX : float;
function Update (){
rotationX = GameObject.Find("Camera").GetComponent(Camera_LookAt).rotationX;
Debug.Log(rotationX);
}


为什么这样不能通过啊?GameObject.Find("Camera").GetComponent(Camera_LookAt)不就是得到组件么?
但是为什么rotationX = GameObject.Find("Camera").GetComponent(Camera_LookAt).rotationX;这又能行呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
发表于 2013-3-17 17:41 | 显示全部楼层
rotation.x  或者rotation.eulerAngles.x
发表于 2017-2-8 22:33 | 显示全部楼层
好帖就是要顶
发表于 2017-2-8 21:57 | 显示全部楼层
难得一见的好帖
发表于 2017-2-8 21:47 | 显示全部楼层
说的非常好
发表于 2017-2-8 22:01 | 显示全部楼层
很好哦
发表于 2017-2-8 21:47 | 显示全部楼层
LZ真是人才
 楼主| 发表于 2017-5-16 19:04 | 显示全部楼层
楼主是超人
发表于 2017-5-16 18:30 | 显示全部楼层
顶顶多好
发表于 2017-5-16 19:18 | 显示全部楼层
难得一见的好帖
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-25 01:36 , Processed in 0.105896 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表