'Light' does not contain a definition for 'areaSize'

I am not sure whether I am doing mistake or what, but according to unity documentation I can get **width** and **height** of unity Area Light by using obj.GetComponent<Light>().areaSize

But in my case it works in Editor mode but it doesn’t works in build mode. Is there any way to fix it?

9120064--1265482--upload_2023-7-3_6-19-50.png

9120064--1265485--upload_2023-7-3_6-20-4.png

The documentation says this property is editor-only. Area lights are baked only, so it’s likely that information just doesn’t exist at runtime.