Destroy a specific tile from a tilemap
I am making a top down game. I want the player to be capable of removing the tile it's collided with by pressing space a few times, I don't have a clue on how to do it tho. Can someone help? Here is the code that detects the collision.
void OnCollisionEnter2D(Collision2D name)
{
if (name.gameObject.tag == "DestructableDirt")
{
print("Collided");
}
}
I have 3 tilemaps in total.
Comment
Your answer
Follow this Question
Related Questions
Shoot bullet towards mouse 0 Answers
I am new to unity and i am making a clone of a a game in which i have some problem 1 Answer
Layer Collision 0 Answers