Camera翻译:Yīm
- actualRenderingPath
- allCameras
- aspect
- backgroundColor
- cameraToWorldMatrix
- clearFlags
- CopyFrom
- cullingMask
- current
- depthTextureMode
- depth
- farClipPlane
- fieldOfView
- layerCullDistances
- main
- nearClipPlane
- OnPostRender
- OnPreCull
- OnPreRender
- OnRenderImage
- OnRenderObject
- OnWillRenderObject
- orthographicSize
- orthographic
- pixelHeight
- pixelRect
- pixelWidth
- projectionMatrix
- rect
- renderingPath
- RenderToCubemap
- RenderWithShader
- Render
- ResetAspect
- ResetProjectionMatrix
- ResetReplacementShader
- ResetWorldToCameraMatrix
- ScreenPointToRay
- ScreenToViewportPoint
- ScreenToWorldPoint
- SetReplacementShader
- targetTexture
- velocity
- ViewportPointToRay
- ViewportToScreenPoint
- ViewportToWorldPoint
- worldToCameraMatrix
- WorldToScreenPoint
- WorldToViewportPoint
Camera.orthographicSize 正交大小
var orthographicSize : float
Description描述
Camera's half-size when in orthographic mode.
在正交模式下相机的一半尺寸。
This is half of the vertical size of the viewing volume. Horizontal viewing size varies depending on viewport's aspect ratio. Orthographic size is ignored when camera is not orthographic (see orthographic).
这个为视体垂直大小的一半,水平视口到校取决于视口的长宽比,相机不是正交时,Orthographic size被忽略(参考 orthographic)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
camera.orthographic = true;
camera.orthographicSize = 5;
}
}
// Set the camera's ortho size to 5
//设置相机的正交尺寸为5
camera.orthographic = true;
camera.orthographicSize = 5;
Using specifically the main camera:
使用专门的主相机:
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Camera.main.orthographic = true;
Camera.main.orthographicSize = 5;
}
}
// Set the main camera's ortho size to 5
//设置主相机的正交尺寸为5
Camera.main.orthographic = true;
Camera.main.orthographicSize = 5;
最后修改:2011年3月6日 Sunday 11:12