Answer the question
In order to leave comments, you need to log in
How to make an object disappear and appear in Unity2D?
Hello!
Wrote a Script thanks to which the object disappears when the player collides with it:
{
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.tag == "Player")
{
gameObject.SetActive(false);
}
}
}
But I can't get the object to reappear when the "Player" exits the Trigger.
Please help, thanks in advance!
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