I Cant Disactive Image Effects

Hello Everyone
I have Unity3D Pro
and The Image Effects works fine

but i’m trying to make option menu

i use this codes

private BloomAndLensFlares bloomToggle;

bloomToggle = Camera.main.GetComponent("BloomAndLensFlares") as BloomAndLensFlares;

but the problem that i cant use :

bloomToggle.enabled = false;

i cant find enabled in the list.

i also tried

bloomToggle = Camera.main.GetComponent<BloomAndLensFlares>().enabled = false;

but also cant find "enabled"

the same code work with other Script
but not work on Image Effects i dont know why

i heard that i must use

using Assets.Scripts;

But I Get This Error

Assets/Scripts/GameSettings.cs(3,7): error CS0246: The type or namespace name `Assets' could not be found. Are you missing a using directive or an assembly reference?

i hope someone got answer

you must declare that you are using Unity.StandardAssets.ImageEffects; because it has a namespace.

I tried this:

Camera.main.GetComponent<BloomAndLensFlares>().enabled = false;

Worked fine.

Not sure why you are having such difficulties, but one issue might have to do with BloomAndLensFlares being written in JavaScript and you are using C#. This can sometimes create problems due to the order in which scripts are compiled.