Camera
extends Component
A component that controls the display of a specific range in a specified area in a specific direction of the camera.
成员变量
Camera.depthTextureMode : DepthTextureMode |
| Whether and how the camera generates a depth texture. |
Camera.farClipPlane : number |
| The distance between the far clipping plane and the camera, in world units. |
Camera.cullingMatrix : Matrix4x4 |
| Set a custom matrix for the camera to be used for all culling queries. |
Camera.worldToCameraMatrix : Matrix4x4 |
| Matrix that transforms from world space to camera space. |
Camera.cameraType : CameraType |
| The type of the camera. |
Camera.depth : number |
| The depth of the camera in the camera rendering order. |
Camera.clearFlags : CameraClearFlags |
| The way the camera clears the background. |
Camera.clearColor : Color |
| The clear color currently assigned to this attachment. The default value is black. |
Camera.aspect : number |
| The aspect ratio of the camera (width divided by height). |
Camera.rect : Rect |
| The rendering position of the camera on the screen in normalized coordinates. |
Camera.orthographic : boolean |
| Whether the current camera is an orthographic camera. |
Camera.orthographicSize : number |
| The size of the orthographic camera. |
Camera.nearClipPlane : number |
| The distance between the near clipping plane and the camera in world units. |
Camera.fieldOfView : number |
| The vertical field of view of the camera, in degrees. |
Camera.cullingMask : number |
| Used to selectively render certain parts of a scene. |
Camera.projectionMatrix : Matrix4x4 |
| Set a custom projection matrix. |
Camera.cameraToWorldMatrix : Matrix4x4 |
| (Read Only) The transformation matrix from camera space to world space. |
Camera.targetTexture : RenderTexture |
| Target render texture. |
静态变量
Camera.allCameraCount : number |
| (Read-only) The number of Camera components. |
Camera.allCameras : Camera[] |
| (Read-only) A list of all instances of the Camera component. |
Camera.mainCamera : Camera |
| (Read Only) The first enabled Camera component. |
Camera.currentCamera : Camera |
| (Read Only) The currently active camera for rendering. |
成员方法
Camera.ScreenPointToRay ( point : Vector3 ) : Ray |
| Create a raycast from a screen point. |
Camera.ScreenPointToWorld ( point : Vector3 ) : Vector3 |
| Converts the screen coordinates of the current camera to world coordinates. |
Camera.ScreenPointToViewport ( point : Vector3 ) : Vector3 |
| Converts the screen coordinates of the current camera to viewport coordinates. |
Camera.ViewportPointToRay ( point : Vector3 ) : Ray |
| Returns a ray from the camera through a viewport point. |
Camera.ViewportPointToWorld ( point : Vector3 ) : Vector3 |
| Converts the viewport coordinates of the current camera to world coordinates. |
Camera.WorldPointToScreen ( point : Vector3 ) : Vector3 |
| Converts world coordinates to screen coordinates of the current camera. |
Camera.ViewportPointToScreen ( point : Vector3 ) : Vector3 |
| Converts the viewport coordinates of the current camera to screen coordinates. |
Camera.WorldPointToViewport ( point : Vector3 ) : Vector3 |
| Converts world coordinates to viewport coordinates of the current camera. |
