Modify SunShafts from C#

I want to change the SunShafts settings (e.g. intensity) from one of my in-game (not in editor) C# scripts.

How is this done?

The auto fill of variable names does not find SunShafts as a name.

i believe that it’s a pro only feature.

you should be able to do something like:

var shafts = GetComponent<SunShafts>();
if (shafts != null)
    shafts.sunShaftIntensity = newIntensity;

In C# it wont find the SunShafts. I have Unity Pro and sun shafts work fine. I just need to change them from a C# script.

This is an old question, but since it wasn’t properly answered…

place -

using UnityStandardAssets.ImageEffects;

at the very top of the script.