- Home /
Can't retrieve the cookie size
Hi there,
there seems to be no "CookieSize" property on directional lights to get or set the cookie size from script. In the official documentation found here, it's said that the "spotAngle" property controls the light cookie size but it doesn't : it simply is the spot angle value...
Any help on that ? A hack I could use to access that property nonetheless ? I mean, the directional lights inspector is able to change it so...
Answer by RockDude · Oct 04, 2011 at 01:19 PM
"Used primarily for Spot lights. !!!Alters the light cookie size on Directional lights!!. No effect for Point lights"
spotAngle changes cookie size ONLY FOR DIRECTIONAL LIGHTS!!! Do you Use directional light or other???
Answer by Patapom · Oct 04, 2011 at 06:02 PM
Yes, I'm using a directional light but the spotAngle property doesn't change anything for my cookie. It's not the cookie size at all but merely the spot angle for spotlights, the documentation seems wrong.
The only way to change the cookie size for directionals is via the inspector, I didn't find any property to change it via script...
Your answer
![](https://koobas.hobune.stream/wayback/20220612234637im_/https://answers.unity.com/themes/thub/images/avi.jpg)