Transparrent tiles not working with tilemap collider

Hi,
I am creating a platformer game.


My issue is that Every time I use tiles that are transparent/translucent the tilemap collider won’t generate a collider for that tile. I read online, and It seemed to be an issue with unity a couple of years ago. Just wondering if there is a simple fix or a way to manually set colliders for specific tiles.


Thanks in advance, Mats

Hello @mats1105 !

Because of how Unity generates default colliders for sprites, you have to manually add a collider to all transparent tiles. To do this, select the sprite with transparent tiles, click Sprite Editor button in the Inspector, then Custom Physics Shape:

Here, you can add new or modify existing colliders to match your preferences. From now on, all new tiles which use sprites with added/modified colliders should properly generate colliders.

CAUTION – if you already have tiles with transparent sprites in your project, their colliders might not have updated correctly. To fix this, select all tiles which use sprites with modified colliders, Change Collider Type from Sprite to None, then back to Sprite. This will force an update in the existing tiles.

We hope this will solve your problem!
All the best,

The Knights of Unity

You can always add box collider by hand as long as those tiles dont move or anything but better would be googling hard and fixing it with tile collider.