I'm trying to change the areaSize
property of an Area Light
object, but it looks like it isn't exposed in the class, itself.
this.light.areaSize =
new Vector2(this.areaLightWidthSlider.Value, this.areaLightHeightSlider.Value);
This code results in the error:
error CS1061: 'UnityEngine.Light' does not contain a definition for 'areaSize' and no extension method 'areaSize' accepting a first argument of type 'UnityEngine.Light' could be found (are you missing a using directive or an assembly reference?)
The documentation says it exists, as an "editor only" property.
Is there any way to programmatically access and change this property, possibly using reflection or serialized properties?
I am using Unity 4.6, if at all relevant.