Answer the question
In order to leave comments, you need to log in
Why can't UI elements be hidden in the void OnTriggerEnter2D(Collider2D other) function?
I need to display the text "Game Over" if the tag of the collider the object touches is equal to "GameOver". I wrote the following
if(other.tag == "GameOver")
{
Debug.Log("GameOver");
text.SetActive(true);
// text - пустой объект к которому привязан текст
}
Answer the question
In order to leave comments, you need to log in
We need all the code and a screenshot of the text object in the editor. Something is turning it back on, most likely.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question