Light.cookie
var cookie : Texture
Description描述
The cookie texture projected by the light.
由灯光投射的cookie纹理。
If the cookie is a cube map, the light will become a Point light. Note that cookies are only displayed for pixel lights.
如果cookie是一个立方图(Cubemap),该灯光将变为点光源。注意,cookie只在像素光源下显示。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Texture2D newCookie;
void Awake() {
light.cookie = newCookie;
}
}
// Expose a reference to a texture in the inspector
//暴露一个texture引用在检视面板
var newCookie : Texture2D;
// Assign the cookie
//指定cookie
light.cookie = newCookie;
最后修改:2011年3月30日 Wednesday 14:01