Trying to enable disable gameobject Getting error

I am simply trying to enable and disable a gameobject.
Done this so many times before. I am getting the error
“enabled is not a member of boolean” OR “active is not a member of boolean”.

here is the code

var test : GameObject;

var testOn : boolean;

function Update()
{
    if(testOn == false)
    {
        test.active = true;
    }

}

Any help would be good.

Thanks in Advance.

Pezz

Hi

Use

test.gameObject.SetActiveRecursively(false);

realm_1

Thanks that worked. I tried that also before making this thread >.<