Activate/Deactivate Image Effect via KeyPress

Hello. I currently am trying to implement a simple enable/disable mechanic for my main cameras image effects.

I have this script here but it gives me errors and i cannot test. All i am trying to do is be able to toggle the effect via pressing a key on the keyboard, kind of like in some games you press “N” for nightvision or whatever and can press it again to turn it off.

Any help is appreciated.

Also, this is part of Aubergines Post Process pack so maybe the folder location is causing the problem when i just try to put the name in the script? Do i need to put like "Assets/Aubergines/Effect/“the effect”?

    public var myEffect : PP_SobelOutlineV3;
    
    function Start ()
        
        {
        
            myLight = GetComponent(PP_SobelOutlineV3);
        
        }
        
         
        
         
        
        function Update ()
        
        {
        
            if(Input.GetKeyUp(KeyCode.Space))
        
            {
        
                myLight.enabled = !myLight.enabled;
        
            }
        
        }

Heres the error code:

    Assets/Deactivate.js(1,23): BCE0018: The name 'PP_SobelOutlineV3' does not denote a valid type ('not found').

its a problem with compilation order
google should give you plenty of results also look here http://docs.unity3d.com/412/Documentation/ScriptReference/index.Script_compilation_28Advanced29.html

I have searched google. Hence thats why i have come to the forum.

If you can help me with some actual script that may assist me or some lines that i have messed up that be more helpful than just posting a link and leaving.

There is nothing wrong with the script itself.

your script “PP_SobelOutlineV3” is probably a c# script. It needs to be compiled befor your script! To achieve this, you should put your PP_SobelOutlineV3.cs inside the Standard Assets, Pro Standard Assets or Plugins folder.

I had a feeling the folder structure was the problem because i saw some people having to put things like “Assets/Folder/Effect” instead of just the effect name.

Thank you