Area Light
In order to make area light work, RealAPI provides custom Area light. Our Area Light can be used at runtime as well as in editor. There are 2 ways you can create Area Light.
- Add by using editor
- Add by using script
Using editor
- Create an empty
Game Object
- Add new component
Real Light
- That's it.
Using script
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);
}