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.cullingMask 消隐遮罩
var cullingMask : int
Description描述
This is used to render parts of the scene selectively.
这个用来选择性的渲染部分场景。
If the GameObject's layerMask AND the camera's cullingMask is zero then the game object will be invisible from this camera. See Layers for more information.
如果GameObject的layerMask与相机的cullingMask进行cullingMask操作后为0,那么这个游戏物体对于该相机是不可见的。参考Layers获取更多信息。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
camera.cullingMask = 1 << 0;
}
}
// Only render objects in the first layer (Default layer)
//只渲染在第一层中的物体(默认层)
camera.cullingMask = 1 << 0;
最后修改:2011年3月6日 Sunday 11:35