Answer the question
In order to leave comments, you need to log in
How to check for the presence of an object in the scene with a specific tag?
I'm confused about something. How to do it?
if (GameObject.FindGameObjectsWithTag("Zombie") == null)
{
Debug.Log("12");
_textWave.GetComponent<AnimationText>().SetTextWave();
}
Answer the question
In order to leave comments, you need to log in
An empty array is returned if there are no such objects.
if (GameObject.FindGameObjectsWithTag("Zombie").Length < 1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question