I have a tilemap with a script which dynamically creates passages in walls by using
This is the original tilemap:
This is the same area when the script creates a passage in the wall:
(screenshot from when the tilemap object was added manually to the scene)
However I’m having a problem when creating the tilemap objects through an object factory.
As you can see in the following screenshot, the tiles are updated correctly by the script, but the collision does not get updated.
(screenshot from when the tilemap object was created by a factory)
What is also strange is that as you can see in the screenshot, new collision areas were created correctly, however they weren’t removed from where tiles were removed.
For now, as a workaround, I will inverse my generation approach and have the script close holes which are open by default, since apparently collision areas can be added but not removed?
Or tell me if there’s a better way to achieve what I’m trying to do
PS: Floor tiles are being randomized, don’t think that these are different tilemaps