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);
}
}