Hey, i wanna check if a GameObject got destroyed (Not in the same script that destroys the gameobject), but i can’t use null because there are always multiple of the same gameobject in the scene so null won’t work.
Here’s my current script :
public class Score : MonoBehaviour
{
public int currentScore;
public Text ScoreText;
public GameObject Hexagon;
void Start()
{
ScoreText.text = "1";
}
void Update()
{
ScoreText.text = "Score : " + currentScore;
[B]Here check if Hexagon GameObject got destroyed[/B]
currentScore = currentScore + 1;
}
}