- 最后登录
- 2013-9-29
- 注册时间
- 2012-8-20
- 阅读权限
- 90
- 积分
- 6371
- 纳金币
- 6372
- 精华
- 0
|
直接把一下代码加到灯光中,
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)
-------------------------------
(gzpyming ) |
|