首页 > 代码库 > Camera.main
Camera.main
在Unity项目的C#代码中可以看到Camera.main.transform.position、Camera.main.transform.eulerAngles、Camera.main.transform.rotation等代码。
那么Camera.main是什么意思呢?
Camera类
A Camera is a device through which the player views the world.
Camera类包含以下静态变量:
allCameras | Returns all enabled cameras in the scene. |
allCamerasCount | The number of cameras in the current scene. |
current | The camera we are currently rendering with, for low-level render control only (Read Only). |
main | The first enabled camera tagged "MainCamera" (Read Only). |
onPostRender | Event that is fired after any camera finishes rendering. |
onPreCull | Event that is fired before any camera starts culling. |
onPreRender | Event that is fired before any camera starts rendering. |
Description of Camera.main
The first enabled camera tagged "MainCamera" (Read Only).
Returns null
if there is no such camera in the scene.
Camera.main
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。