Light.cullingMask 消隐遮罩

var cullingMask : int

Description描述

This is used to lights parts of the scene selectively.

这个用来照亮选择性的部分场景。

If the GameObject's layerMask AND the light's cullingMask is zero then the object will not be lit by this light. See Layers for more information.

如果GameObject的layerMask与灯光的cullingMask为0,那么这个游戏物体不能被这个光源照亮。参考Layers获取更多信息。

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	void Awake() {

	l	ight.cullingMask = 1 << 0;

	}

}
// Only light objects in the first layer (Default layer)

//只照亮第一层中的物体(默认层)



light.cullingMask = 1 << 0;
Page last updated: 2011-3-30