[Windows Phone 8.1] QualitySettings - turn off shadows in code

I have the default 6 Quality Settings. I’m outputting project to Universal App (Windows Store 8.1 and WP 8.1). I’m having issues with shadows on WP 8.1 so I’d like to retain the quality settings but turn off shadows on all the quality settings at runtime. How can I accomplish this?

I found that a lot of shader are not support in WP8 platform ,when use LIGHTMODE=SHADERCOLLECTOR or FORWARD

Hi,

you can do it per light:

or, you can create a Quality Setting without shadows and use this to activate it at runtime:

This worked, thanks for the tip

#if UNITY_WP_8_1
// Disable shadows on Windows Phone 8.1
Light[ ] _lights = GameObject.FindObjectsOfType(typeof(Light)) as Light[ ];
if (_lights != null)
{
foreach(Light _light in _lights)
{
_light.shadows = LightShadows.None;
}
}
#endif