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').