灯光强弱控制代码
private var scrollPos : float = 1.0;private var lightObject : Light;
public var skyBoxMaterial : Material;
function Start()
{
lightObject
= GetComponent(Light);
}
function Update () {}
function
OnGUI()
{
GUI.Window(100,Rect(0,0,280,40),LightWindow,"Ligh");
}
function
LightWindow(windowId : int)
{
scrollPos = GUI.HorizontalSlider (Rect
(5,20,255,20), scrollPos, 0.0, 2.0); lightObject.color = Color
(scrollPos, scrollPos,
scrollPos);
//Debug.Log(lightObject.color);
}
@script
RequireComponent(Light) 很不错 楼主是超人 顶顶多好 说的非常好 不错不错 楼主是超人 顶顶多好 说的非常好 不错不错