Activate and Desactivate Animated Objects

I dont undestand why this script is not running as i want, i just want the object appear and disappear, i tried with .renderer disable but in animated objects dosent appear in the inspector, so i want simple activate and disactivate the whole object, i can desativate but then, is imposible to activate again, how can this be?:

using UnityEngine;
using System.Collections;

public class Yo : MonoBehaviour
{

// Use this for initialization
void Start () 
{

}

// Update is called once per frame
void Update () 
{
	if(Input.GetButtonDown("E"))
	{
		cambio2();
		Debug.Log ("se ve");
	}

	if(Input.GetButtonDown("Q"))
	{
		cambio1();
		Debug.Log ("no se ve");
	}


}
	

void cambio1()
	{
	gameObject.SetActive(false);
	}
   

void cambio2()
    {
	gameObject.SetActive(true);
    }

}

If you do: SetActive( false )

Your game object and all components no longer run, therefore, you don’t have a script that is able to set it to true.

The Solution:

Using an empty Game Object, create a script that includes this game object inside:

public GameObject animatedObj;

Add the object that you want to disable/enable to the GameObject variable via inspector or in the start function:

void Start ()
{

animatedObj = GameObject.Find("Object Name");

}

Use the same script as you have above, just change :

gameObject.SetActive();

to

animatedObj.SetActive();

Now the script won’t be disabled and therefore you can control everything on the animated object from the new GO’s script

Hope that helps