- Home /
How do I remove coliders using a Tilemap Collider?
I use a Tilemap Collider 2D in combination with a Tile Palette but everytime I remove a tile with the Pallete the coliders seem to stay. They are completely invisible because I can't see them on any grid but my character does get blocked on the spots where I removed something. I don't know if I am being stupid but I hope that with your help I can find a solution.
You're not being stupid the tilemaps are pretty bad. I had to watch so many vids to figure them out. I could suggest making sure that your active tilemap in the tile pallette is set to the layer in that actually has collision enabled on them before you rub them out?
Thank you for your help Crumpet. I also found out that when I restart Unity the colliders are gone so I think it's just a bug.
Answer by CvetelinLD · Sep 04, 2019 at 06:25 PM
Just enable and disable the tilemap collider
code:
TilemapCollider2D collider = GetComponent();
collider.enabled = false;
collider.enabled = true;
Your answer
![](https://koobas.hobune.stream/wayback/20220612191441im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Getting cell position of a Tile from a reference to that Tile at runtime 0 Answers
How to get adjcent tiles (horizontal or vertical) in an isometric tilemap ? 1 Answer
2D: Best way to group a type of tile based on their neighbors similar type? 1 Answer