The type or namespace name 'Text' could not be found (are you missing a using directive or an assembly reference?)
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Destroy : MonoBehaviour
{
public GameObject explosion; //игровой объект для взрыва астеройда
public GameObject playerExplosion; //игровой объект для взрыва корабля игрока
public GameObject Fdf;
public GameObject Puc;
public GameObject kuritsa;
public GameObject gi;
void Start()
{
Fdf.SetActive(false);
Puc.SetActive(false);
kuritsa.SetActive(false);
gi.GetComponent<Text>().enable = false;
}
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
}
Fdf.SetActive(true);
Puc.SetActive(true);
kuritsa.SetActive(true);
gi.SetActive(true);
Destroy(gameObject);
Destroy(other.gameObject);
}
}