- Home /
light.intensity shows error
i am using Unity 5.4.1
whenever i write "light. " its is not showing 'intensity' option
and light.color too
it shows an error on "color" and "intensity"
Answer by Bodhid · Aug 31, 2017 at 11:32 AM
GameObject.light is obsolete. Create a private Light and set it with GetComponent<Light>()
After that you can adjust the private Light reference. Or use getcomponent everytime without caching it.
Light, not light.
lightintensity = GetComponent.().intensity;
Also, please read up what camelCaps is!
what's the difference b/w Light ,light @Ju_$$anonymous$$ is there any PDF available for Beginners
Your answer
Follow this Question
Related Questions
How to turn on a light, then off with the same button. 1 Answer
[CLOSED] Change intensity of a light with script (which isn´t attached to the light object) 1 Answer
Incorrect Intensity value of Light component loaded from Assetbundles 0 Answers
Combinning light shading and slider? 1 Answer
Changing a bunch of lights intensity 2 Answers