How to disable/enable SSAOEffect or other specific Components?

Hey everyone. I’m trying to access my camera’s own SSAOEffect component in order to be able to turn it off and on for now. Can’t seem to even store it in a variable. And then “enabled” isn’t part of Component and I’m just lost. First time posting I hope the formatting is ok. My attempt:

// components
private var componentSSAO : Component;

function Start () {

	componentSSAO = gameObject.GetComponent("SSAOEffect");
	componentSSAO.enabled = false;


The error:

Assets/scriptTest1.js(9,23): BCE0019:
‘enabled’ is not a member of

Even when I make the variable public and just drag the component in there with the inspector, I still can’t figure out how to disable it.

Sorry everyone. I figured it out by searching Unity Answers again. Here’s what I did:

var SSAOComponentVar : SSAOEffect;

function Start () {

	SSAOComponentVar = gameObject.GetComponent("SSAOEffect");
	SSAOComponentVar.enabled = false;

So I don’t really understand it yet, but I guess the “type” of component is actually SSAOEffect, the same name as the component. I guess I was making it overly complicated. Leaving it here in case anyone needs it.