Camera.cullingMask 消隐遮罩

var cullingMask : int


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.


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;
Page last updated: 2012-9-11