Answer the question
In order to leave comments, you need to log in
How can I make all objects with the same tag show through the script (before that they are hidden)?
Here is the script:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class Destroy : MonoBehaviour
{
public GameObject explosion; //игровой объект для взрыва астеройда
public GameObject playerExplosion; //игровой объект для взрыва корабля игрока
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
}
Destroy(gameObject);
Destroy(other.gameObject);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question