Unity Area Light
Unity3D Area Light
我们的区域光可以在运行时和编辑器中使用。
有两种方式可以创建区域光
创建一个空的"GameObject"

添加一个名为 "Real Light" 的新组件
完成。现在您可以执行诸如 "位置、旋转、缩放" 等变换操作,以及区域光操作,如强度、颜色等.

通过 C# 编写
private void AddAreaLight()
{
const float width = 1f;
const float height = 2f;
const float intensity = 20f;
var color = Color.yellow;
var areaLight = RealMesh.AreaLight(width, height, intensity, color);
areaLight.transform.position = new Vector3(1, 2, 1);
}


Last updated