when i open my project i can only see 1 letter in the debug log it also doesn’t show the sprite after i press x than c.
here is my code
using UnityEngine;
using System.Collections;
public class hide_show : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown("z"))
{
gameObject.SetActive(false);
Debug.Log("z");
}
if (Input.GetKeyDown("x"))
{
gameObject.SetActive(false);
Debug.Log("x");
}
if (Input.GetKeyDown("c"))
{
gameObject.SetActive(true);
Debug.Log("c");
}
}
}