码迷,mamicode.com
首页 > 其他好文 > 详细

Camera.main

时间:2017-04-12 02:15:41      阅读:444      评论:0      收藏:0      [点我收藏+]

标签:scene   ice   var   意思   form   cti   count   ret   orm   

在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

标签:scene   ice   var   意思   form   cti   count   ret   orm   

原文地址:http://www.cnblogs.com/lakeone/p/6696974.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!