> For the complete documentation index, see [llms.txt](https://usmanheart.gitbook.io/realapi-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://usmanheart.gitbook.io/realapi-1/area-light/unity-area-light.md).

# Unity Area Light

Our Area Light can be used at runtime as well as in editor.

There are two ways you can create Area Light.

1. **Manually adding in editor**

* Create an empty **Game Object**

<figure><img src="https://github.com/Realistic3D/RealAPI/blob/main/docs/readme/.gitbook/assets/1.jpg" alt=""><figcaption><p>Empty game object</p></figcaption></figure>

* Add new component "**Real Light**"
* That's it. Now you can perform transform operations such as "Position, Rotation, Scale" and area light operations such as intensity, color etc.

<figure><img src="https://github.com/Realistic3D/RealAPI/blob/main/docs/readme/.gitbook/assets/2.jpg" alt=""><figcaption><p>Real Light</p></figcaption></figure>

2. **By using C#**

```csharp
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);
}
```

<figure><img src="https://github.com/Realistic3D/RealAPI/blob/main/docs/readme/.gitbook/assets/4.jpg" alt=""><figcaption><p>Simple example of creating area light</p></figcaption></figure>

<figure><img src="https://github.com/Realistic3D/RealAPI/blob/main/docs/readme/.gitbook/assets/3.jpg" alt=""><figcaption><p>Real API area light</p></figcaption></figure>
